Created
July 20, 2021 08:02
-
-
Save diasraphael/09986cdff78f5245d103a9bd4188b6bd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function reverseString(str){ | |
let reverse = ""; | |
for (let a = str.length - 1; a >= 0; a--){ | |
reverse = reverse + str[a]; | |
} | |
return reverse; | |
} | |
console.log(reverseString("World")); | |
console.log(reverseString("")) | |
console.log(reverseString("T")) | |
console.log(reverseString("raw")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment