Skip to content

Instantly share code, notes, and snippets.

@alesanabriav
Created September 23, 2019 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alesanabriav/071463b201144c129253f401b70c7452 to your computer and use it in GitHub Desktop.
Save alesanabriav/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