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 - How to display all orders for a single product showing the most recent first? Woocommerce -

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

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -