How to set timeout in JavaScript

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