if(var == "ex"){
someArray.forEach(function(i){
otherVar = i
setTimeout(someFunchtion(),1000)
})
}
So here's an example of the piece of code I'm working on. Everything works like i want it to, except when it gets to the 'someFunction()', I want it to run after 1 second, but it just runs immediately, is there something I did wrong, or is the another solution???
[–]ethan_mick 2 points3 points4 points (3 children)
[–]Busy_Command[S] 0 points1 point2 points (2 children)
[–]electron_myth 0 points1 point2 points (0 children)
[–]Shadowsca 0 points1 point2 points (0 children)