Having trouble with writting a while loop to print a message 3 times. Please help


#1

This is the program I have written to print a message 3 times using a while loop.

var aRay = [ 0, 1, 2];
var i = 0

var loop = function(aRay){
while(aRay === i){
console.log("I'm looping!");
i++;
}
};

loop(aRay);

Making the | i = | the array, and increasing | i | incrementally should make it | = | true. Printing out the message 3 times.
Error message asking "Are you logging 'I'm looping!' to the console three times?"

Thanks for the help in advance.


#2

We don't answer personal project questions in the track categories of Q & A. These questions belong in the Corner Bar. Please, either relate this question to an exercise (post a link to it), or the thread will be moved. Thank you.


#3

I'm sorry I'm new to this. What corner bar should I be using, and are you talking about a link to the course question?


#4

This isn't a personal project question? it's lesson 5


#5

For some reason I've not seen the responses here. Please post a link to the exercise so we can get up to speed. Thank you.


#7