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

php - Autoloader issue not returning Class -

java - How to put two numbers separated by a space into two different arrays -

python - matplotlib equivalent for Ubuntu servers with no GUI? -