Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reverse a string 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
5+9 =