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 in typescript
let toBeReversed: string = `.eslaf eb t'ndluow ecnetnes siht ,dehctiws erew eslaf dna eurt fo sgninaem eht fI`;
let charArray: string[] = toBeReversed.split('');
console.log(charArray);
let reverseArray: string[] = charArray.reverse();
console.log(reverseArray);
let reversedArray: string = reverseArray.join('');
console.log(reversedArray);
output:
If the meanings of true and false were switched, this sentence wouldn't be false.
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