Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript reverse a string

const reverse = str => str.split('').reverse().join('');

reverse('hello world');     
// Result: 'dlrow olleh'
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #javascript #reverse #string
ADD COMMENT
Topic
Name
5+8 =