Answers for "inverted uses in javascript"

60

javascript reverse a string

function reverseString(s){
    return s.split("").reverse().join("");
}
reverseString("Hello");//"olleH"
Posted by: Guest on August-05-2019
0

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.
Posted by: Guest on November-24-2020

Code answers related to "inverted uses in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language