How do I constantly check a variables value. For example:
if(variable == \'value\'){ dosomething(); }
This would work if I constantly loope
Use setInterval:
var key = '' setInterval(function(){ if(key == 'value'){ dosomething(); } }, 1000);