Is this even possible to do? I want to use the same function at different intervals. How can I make the function run at 5000 and execute certain part of code within the function.
here is an example to give an idea:
var moto = function(){
// at 5000 run this part of code
console.log("did stuff when called at 5000 time interval")
// at 6000 run this part of code
console.log("did stuff when called at 6000 time interval")
}
window.setInterval(moto, 5000)
window.setInterval(moto, 6000)