How to clear timeout in JavaScript

Functions
By Vijay Singh · 
Last updated Jan 28, 2019
const timeOutId = setTimeout(() => {
  console.log("I will not be printed");
}, 2000);

clearTimeout(timeOutId);