8/11 "When to while and when to for" HELP


#1

I'm new to coding - I'm trying to sort of recreate one of the earlier functions in this lesson using while loops; I'm receiving syntax error feedback. Any advice will be extremely appreciated.

....

var text = "Push these letters one by one"
var capture = [ ]

for (var i=0; (i<text.length + i); i++){
    console.log(.push(capture[i]));
}

var a = 0

while (a< (text.length + 1)){
    .push(capture[a]);
    a++;
}

....


#2

Here, I believe you should push to capture, instead of push to nowhere. :smiley:
I might be wrong about that.

capture.push(i)


#3

Also rethink your conditions:

i<text.length + i

this is always and unchangeable true for text.length >0 and always false for text.length=0.