Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to reverse a string in javascript

const str = 'JavaScript is awesome';

function reverseAString(str) {
   return str.split('').reverse().join('');
}

console.log(`Reversed string is: ${reverseAString(str)}`);
Source by github.com #
 
PREVIOUS NEXT
Tagged: #reverse #string #javascript
ADD COMMENT
Topic
Name
8+4 =