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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -