Yup you can. `setInterval` is just a recursive timeout out with a base case


var time = function(){
         // do something
         setTimeout(time, 1000);
}

// stopping
clearTimeout(time)

Not ideal, but it works