Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript setTimeout() method returns the interval id

// program to display a text using setTimeout method
function greet() {
    console.log('Hello world');
}

let intervalId = setTimeout(greet, 3000);
console.log('Id: ' + intervalId);
 
PREVIOUS NEXT
Tagged: #javascript #method #returns #interval #id
ADD COMMENT
Topic
Name
8+7 =