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


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++){

var a = 0

while (a< (text.length + 1)){



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



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.