javascript - setInterval Spotify apps -
javascript - setInterval Spotify apps -
i'm having problem using setinterval/clearinterval.
i've tried this: int = setinterval(somefunction(), 1000); phone call somefunction() once, instead of 1 time every second?
so tried this: int = setinterval("somefunction()", 1000); , works in way, because gives me error uncaught referenceerror: somefunction not defined every second?
why? d:
setinterval takes 2 arguments: function, , time in milliseconds time between calls.
your first illustration wrong because doesn't give function argument, executes function , passes result first argument. alter setinterval(somefunction, 1000) , it'll work.
javascript api spotify
Comments
Post a Comment