In a function, normally you would use setTimeout() to delay a function. However, it will be kind of annoying when you need to use setTimeout() a number of times. For example:
function annoying(){
setTimeout(function(){
//code
setTimeout(function(){
//code
setTimeout(function(){
//code
}, 3000)
}, 3000)
}, 3000)
}
So is there a simple function to delay it, like time.sleep in python?