javascript-exercises/foundations/07_reverseString at main · N3tCode/javascript-exercises · GitHub
Skip to content

Latest commit

 

History

History
 
 

Folders and files

README.md

Exercise 07 - Reverse a String

Pretty simple, write a function called reverseString that returns its input, reversed!

reverseString('hello there') // returns 'ereht olleh'

Hints

Strings in JavaScript are immutable and, therefore, cannot be reversed directly in place. While there is no built-in method for this, several alternative approaches can be used, drawing on the concepts you've been introduced to in the lessons.