How to set timeout in JavaScript

Functions
Last updated Nov 05, 2018
setTimeout(() => {
  console.log("I am called after 5 seconds");
}, 5000);
I am called after 5 seconds