0

How to reverse String in JavaScript

JavaScript
const reverseString = (str) => {
 	return str.split('').reverse().join('');
}

console.log(reverseString('String')); // "gnirtS"
RUN
add comment
Suggest a different solution or add another example