javascript - clearInterval in if doesn't work -


i have this:

function myfunction() {     var testvar;     if(txt == "maybe")     {         txt == "no";         testvar = setinterval(function(){ zrobto() }, 1000);     }     else if(txt == "no")    {         txt == "maybe";         clearinterval(testvar);     } } 

when clearinterval isn't in if code working, wanna have in if. possible?


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -