setTimeout(() => {
console.log('This is settimeout')
}, 2000)
const myTimer = setTimeOut(() => {
console.log('This is settimeout')
}, 2000)
functionStopTimer(){
clearTimeout(myTimer);
}
setInterval(() => {
console.log('This is setinterval timer')
}, 2000)
const myInterval = = setInterval(() => {
console.log('This is setinterval timer')
}, 2000)
functionStopInterval(){
clearInterval(myTimer);
}