split reverse join javascript array index code example
Example 1: javscript .split().reverse.join
"this is a test string".split("").reverse().join("");
Example 2: reverse words in a string javascript
function reverseString(str) {
return str.split("").reverse().join("");
}
reverseString("hello");