set interval, setinterval
var id = setInterval(function() { console.log('jestem wywoływana co 2 sekundy'); }, 2000 ); clearInterval(id);