How to set interval in JavaScript

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