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;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly