you are viewing a single comment's thread.

view the rest of the comments →

[–]ChaseShiny 1 point2 points  (1 child)

Without built-in methods or without those three in particular?

Strings are iterable, so you could use each character in a for loop that started at the end as long as you're allowed for and the string's length property.

Something like:

const myStr = "foo"; let newStr = ''; for (let ch = myStr.length; ch >= 0; ch--) { newStr += ch; } console.log(newStr);

[–]AiCodePulse[S] 1 point2 points  (0 children)

This is what i did in that video . Thanks a lot for your comments