The quality of your software product represents your business vision and brand image.
Our team of tool-agnostic testing experts can help you release excellent software
products at a much lower cost and without the associated hassle
of setup.
With more than 22 years of experience in providing QA services to clients across
different industry verticals, we have developed a proven approach to deeply
integrate with their engineering teams to launch
bug-free software.
Learn
The global setTimeout() method initiates a timer, and when it expires, it executes a specified function or block of code.
JavaScript engine generates a new function and adds it to the call stack when the method setTimeout() is called.
Web APIs component of the web browser conducts setTimeout() and commences a timer. The callback function supplied to the method setTimeout() is added to the queue after the timeout expires.
setTimeout(function, milliseconds);
Here, milliseconds is the amount of time it takes for a function to be executed and function is a block of code
Syntax
Example:
// Display a text using setTimeout method
function displayText() {
console.log('Hello world');
}
setTimeout(displayText, 3000);
console.log('This message is shown first');
Output
This message is shown first
Hello world
In the program above, after 3000 milliseconds, the method setTimeout() executes the function
displayText().
Disclaimer
This publication is for informational purposes only, and nothing contained in it should be considered legal advice. We expressly disclaim any warranty or responsibility for damages arising out of this information and encourage you to consult with legal counsel regarding your specific needs. We do not undertake any duty to update previously
posted materials.
QASource exists to help organizations like yours enjoy the benefits of a full QA department without the associated setup cost and hassle. With an emphasis on time-bound delivery and customized solutions, we excel at helping our partners
manage the quality of their deliverables while keeping
costs low.