If a game is running at 177FPS or 22FPS, how is the player movements calculated? I’m trying to do this in Javascript:
setInterval(update, 0);
function update() {
player_x++;
}

Problem is if the player will be move faster/slower according to the frame rate. How would I solve this?
I highly recommend using requestAnimationFrame when available (which will get you the best frame rate possible in modern browsers) and setTimeout when not. Then base your players position on the time since the animation started:
JSFiddle