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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly