Last active
December 19, 2016 23:54
-
-
Save bflannery/dc04ebbf7709feb2499338f5efa5967a to your computer and use it in GitHub Desktop.
Reverse String
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
// Reverse the provided string. | |
// You may need to turn the string into an array before you can reverse it. | |
// Your result must be a string. | |
function reverseString(str) { | |
var reverseStr = str.split('').reverse().join(''); | |
return reverseStr; | |
} | |
console.log(reverseString("hello")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment