Prototype in javascripts -
how xcount go 100.
xcount==100;
var x= 'insert code here'; (xcount = 1; xcount < 100 && x == x.constructor; xcount++) x = x.constructor;
x has got method constructor(), not property constructor. setting x=x.constructor in loop avoid exit condition of loop. loop has "finished before started" (i.e. never ran) because condition not met when entering loop!
if @ x.construcor console.log(x.constructor) like
function string() { [native code] } if want loop run must set
x=x.constructor before loop!
Comments
Post a Comment