Top "Settimeout" questions

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

Is it true that if possible I should never use setInterval & setTimeout?

I am learning to code in JavaScript. I am programming something with some timed mouse animation. I'm just about to …

javascript settimeout setinterval requestanimationframe
Is using async in setTimeout valid?

I had a asynchronous function in Javascript and I added setTimeout to it. The code looks like that: let timer; …

javascript asynchronous settimeout ecmascript-2017
What the difference between window.setTimeout() and setTimeout()?

I would like to know what the difference is between window.setTimeout(myFancyFunciton, 1000); and setTimeout(myFancyFunciton, 1000); Both seem to do …

javascript settimeout
Passing functions to setTimeout in a loop: always the last value?

I'm trying to use setTimeout to execute an anonymous function that I pass information into and I'm having trouble. This (…

javascript settimeout
clearTimeout() not stopping setTimeout

I'm trying to build a really simple timer in Javascript (based on input from an HTML form), and my clearTimeout …

javascript timer settimeout cleartimeout
Why does Underscore.js have a delay function?

This is the source code for Underscore.js' delay function: _.delay = function (func, wait) { var args = slice.call(arguments, 2); return …

javascript underscore.js settimeout
jQuery: Fire mousemove events less often

I'm trying to figure out a clean way to aggregate mousemove events so that I ensure my code gets called, …

jquery settimeout mousemove
How do I do the equivalent of setTimeout + clearTimeout in Dart?

I'm porting some JavaScript to Dart. I have code that uses window.setTimeout to run a callback after a period …

dart settimeout dart-async
Trouble with setTimeout with addEventListener

I have a vimeo video that I want to play 3 seconds after a button is clicked. I can get the …

javascript settimeout addeventlistener froogaloop
What is the reason JavaScript setTimeout is so inaccurate?

I got this code over here: var date = new Date(); setTimeout(function(e) { var currentDate = new Date(); if(currentDate - …

javascript settimeout