Suppose I have an array that stores all my ids used for setInterval.
What if I want to create an id, dynamically… can I do like this?
id_array.push(++id_var) = setInterval(function, milliseconds);
See?
I also have a variable, called ‘id_var’, that I believe, if I increment it, it will give me, a new ‘id’.
Is this code correct?
id_array.push(setInterval(function, milliseconds));or use an object:
to clear all: