Przepisać kod na ECMAScript 2018, wyrównać ilość wyświetlanych klatek
window.requestAnimFrame = (function(FPS){
let last = 0;
let call = 0;
return function(callback, element){
let curr = new Date().getTime();
call = Math.max(0, (1000/FPS) - (curr-last));
window.setTimeout(callback, call);
last = curr + call;
}
})(60);