Last active
February 19, 2024 01:31
-
-
Save tdubs42/4e092fadf0d94ed836330c2025a069a6 to your computer and use it in GitHub Desktop.
Reverse String - JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This challenge is slightly misleading, as it says to reverse a string but inputs an array and expects an | |
array as output. If you need to return this as a string, use the String.join() method | |
*/ | |
const reverseString = s => { | |
const reverseArray = s.reverse() | |
return reverseArray | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment