javascript - array is empty as soon as i loop over it using the this keyword -


i have array populated objects , , when loop on using keyword , empty array, peice of code below:

for(var =0, j = this.data.length ; < j ; i++) {             var cur = this.date[i];             var bubble = this.createbubble(width , this.year.min , cur.start , cur.end );              /* add data-duration once have figured out */             var line = [                 '<span style="margin-left: ' + bubble.getstartoffset() + 'px; width: '                  + bubble.getwidth() + 'px; " class="bubble bubble-' + (cur.type || 'default' ) +  '"></span>',                 '<span class="label">'+ cur.text +'<span>'                        ].join('');              html.push('<li>'+  line  +'</li>')           } 

see secound line var cur = this.date[i]; , if add breakpoint line of code , , in console, if this.data , array of objects , when hover on this.data[i](in source tab) , data seems empty , idea why ? script getting stuck here because of error.

recreating bug can see error here , go source tab in chrome , open reverse.js , add breakpoint line 29 ... reload , you'll see described above.

so repeat question, why this.data[i] empty ? have this loosing context , don't think , still asking ?

haven't mistake? this.data[i], in code see var cur = this.date[i];


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -