let myVar = setInterval(() => {console.log('bop'), 1000);
clearInterval(myVar);
let autoScroll = window.setInterval(() => {
if (window.scrollY >= document.getElementById('second-part').scrollHeight) {
clearInterval(autoScroll);
}
window.scrollBy(0, 10);
}, 25);
clearInterval(interval)
window.clearTimeout(yourTimer)
var refreshIntervalId = setInterval(fname, 10000);
/* later */
clearInterval(refreshIntervalId);
// See the docs for setInterval() and clearInterval()