JS Built In Functions Flashcards
1
Q
setTimeout()
A
a built-in function provided by the JavaScript runtime environment, and it is used to schedule the execution of a function or code snippet after a specified delay.
function greet() {
console.log(“Hello!”);
}
setTimeout(greet, 2000); // Executes the greet
function after a delay of 2000 milliseconds (2 seconds)