javascript - why isnt this setInveral function working? -


i cant figure out i'm doing wrong

 function countnum(){      let num=0;      function inner(){             num++             console.log(num);                }           }   setinterval(countnum,1000) 

you defining function not calling

function countnum(){      let num=0;      function inner(){             num++             console.log(num);                }               inner();/////////////////////////////           }   setinterval(countnum,1000) 

Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -