-
-
Save simon0191/56ae04b3a222700a42f1 to your computer and use it in GitHub Desktop.
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
function main(str) { | |
var s = ""; | |
for(var i = str.length-1;i>=0;--i)s+=str[i]; | |
return s; | |
} | |
console.log(main('hola')); | |
console.log(main('mundo')); | |
console.log(main('mundo bla')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment