setTimeout Callback

  • setTimeout takes a callback that runs when the specified timer runs out
function printSomething() {
    console.log("Belated Hello!");
}

setTimeout(printSomething, 5000);

19 / 27