Top "Settimeout" questions

setTimeout is a global JavaScript method, used to execute a particular function or piece of code after a given delay.

setTimeout and array each

I'm confused with using setTimeout and the each iterator. How can I rewrite the following so that the console outputs …

javascript underscore.js settimeout each
Call setTimeout without delay

Quite often see in JavaScript libraries code like this: setTimeout(function() { ... }, 0); I would like to know why use such a …

javascript settimeout
Is setTimeout with no delay the same as executing the function instantly?

I am looking at some existing code in a web application. I saw this: window.setTimeout(function () { ... }) Is this the …

javascript delay settimeout timing
setTimeout or setInterval or requestAnimationFrame

For HTML5 games,with canvas animation for mobile devices. I'm facing some performance issues which differ the speed between each …

html canvas settimeout setinterval requestanimationframe
Simple Countdown Timer Typescript

I have the following code in my constructor: constructor(){ for (let i = 0; i < 90; i++) { setTimeout(() => { this.counter = this.…

typescript settimeout countdown
Is calling setTimeout with a negative delay ok?

The following snippet sets a timeout that I'd like to last at least a second: var currentTimeMillis = new Date().getTime(); // …

javascript settimeout
How to clear a settimeout in react

On each question component, I am trying to clear the time out. So on componentWillMount() I will start the timer …

javascript reactjs settimeout cleartimeout
setTimeout in react setState

this.setState(prevState => ({ score: prevState.score + 10, rightAnswers: prevState.rightAnswers + 1, currentQuestion: setTimeout(() => { prevState.currentQuestion + 1 }, 2000) })) } On button click I change …

javascript reactjs settimeout setstate timedelay
Wait for function till user stops typing

I have users making ajax call while typing. The problem is that it makes the call for every letter being …

jquery events delay settimeout
Is it possible to chain setTimeout functions in JavaScript?

Is it possible to chain setTimout functions to ensure they run after one another?

javascript settimeout