javascript reverse a string
function reverseString(s){
return s.split("").reverse().join("");
}
reverseString("Hello");//"olleH"
javascript reverse a string
function reverseString(s){
return s.split("").reverse().join("");
}
reverseString("Hello");//"olleH"
reverse string js
function reverseString(str) {
var newString = "";
for (var i = str.length - 1; i >= 0; i--) {
newString += str[i];
return newString;
}
reverseString('hello');
reverse string javascript
const reverse = (str) => str.split("").reverse().join("");
reverse order string js
function spinWords(pw){
let a = pw.split(" ")
let variavel = ''
console.log('1º Problema da Vida Real')
for (var i = 0; i < a.length; i++) {
if(a[i].length <= 5){
variavel += a[i].split("").reverse().join().replaceAll("," , "") + " "
}
else {
variavel += a[i] + " "
}
}
return variavel
}
let hey = "hello worlds";
console.log(spinWords(hey)) // olleh worlds
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us