PromptWave AI Logo Beta

My code isn't working what's wrong This is it var animals...

My code isn't working what's wrong This is it var animals...

 44  0
Other
My code isn't working, what's wrong?
This is it:

var animals = ["elephant", "orca", "sloth"];

car counter = 1;
while (counter < animals.length) {
    console.log(animals[counter]);
}

Text Output

You're almost there! You just ned to make sure to increment the counter variable inside the loop, otherwise it will get stuck in an infinite loop.

Notes

Khanmigo
SvetlinNakov Avatar SvetlinNakovposted
An error has occurred. This application may no longer respond until reloaded. Reload 🗙