JSFiddle - React, Tailwind, and code Playground

by A B Jones

HTML

<button id='speedUp'>
speed up
</button>

JavaScript

var interval=2000;

setInterval(function () {
interval = getInterval();
console.log('interval')
}, interval);


function getInterval(){
return interval;
}


$('#speedUp').on('click', function(){
interval-=100;
console.log(interval)
})