Loading...
Problem Description
Write a function called reverseString that takes a single string as an argument and returns a new string with the characters in the reverse order.
For example:
reverseString("hello")should return"olleh"reverseString("JavaScript")should return"tpircSavaJ"
Now, for your first nudge... 💡
The 'Syntax Nudge'
A very clean way to solve this involves changing the string into a different data type that's easier to re-order, and then changing it back. I suggest you research these three highly useful JavaScript methods on MDN (the Mozilla Developer Network):
String.prototype.split()Array.prototype.reverse()Array.prototype.join()
Loading...