I need to count up from 1 to 60 but i want to count up with an easing, so for example it would go from 1 to 30 with a 100ms delay, after that i need to increase the delay so the counting will gradually slow down when it reaches 60. This is what i got so far(not much):
var i = 0;
var interval = setInterval(function(){
i += 1;
console.log(i);
if(i == 60) {
clearInterval(interval);
}
}, 100);