Sign In
Curriculum
Reverse String
Mark as Completed
Reverse String
In this exercise you're tasked with reversing the letters of the given string
s
.
Here's how you can do it: convert
s
to an array using the
split
(
)
method, reverse the array using the
reverse
(
)
method, and then convert it back to a string using the
join
(
)
method.
Finally, log the resulting string to the console.
Click to go back
Click to go forward
Refresh preview
Console
Submit
Solution
00:00
Previous Lesson
Next Lesson