How to clear timeout in JavaScript

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

clearTimeout(timeOutId);