String methods Flashcards
1
Q
reverseWord(word)
A
function reverseWord(word) { var reverse = '';
for (var i = word.length - 1; i >= 0; iā) {
reverse += word[i];
console.log(reverse);
}
return reverse;
}
reverseWord(word)
function reverseWord(word) { var reverse = '';
for (var i = word.length - 1; i >= 0; iā) {
reverse += word[i];
console.log(reverse);
}
return reverse;
}