Javascript Error: too much recursive with SetTimeOut
Got an error when I tried to run a function with parameters using SetTimeOut. My code is something like this:
1 |
setTimeout(showTask(id), 1000); |
Which results to an error of too much recursive. The fixed is just call it into a function:
1 |
setTimeout(function() { showTask(id); }, 1000); |