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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -