Please help me with this 😥

I wanna make a code which reverses the text

Hey there,

So you want your for loop to start at the last letter of 'hello', and loop until it reaches the first letter.

Right now, i is set to string.length, which is 6. Remember that indexing starts at 0, so the index of the 'o' in 'hello' is 5.

Change let i = string.length to let i = string.length - 1

Also remember that the 2nd part of the classic for loop tells the loop to run as long as a certain condition is true. As soon as it becomes false, the for loop stops.

Right now you have i === 0. This means that the loop is stopping as soon as you start it, because you’ve set i to a number greater than 0.

Change i === 0 to i >= 0.

Hope this helps!
Ben