Skip to content

Instantly share code, notes, and snippets.

@alejandrosanabriav
Created September 23, 2019 04:05
Show Gist options
  • Save alejandrosanabriav/071463b201144c129253f401b70c7452 to your computer and use it in GitHub Desktop.
Save alejandrosanabriav/071463b201144c129253f401b70c7452 to your computer and use it in GitHub Desktop.
function reverseWord(word) {
let newWord = '';
for (var i = word.length -1; i > -1; i--) {
newWord += word[i];
}
return newWord;
}
const r = reverseWord('nea life');
console.log(r);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment