const ballIsOutOfBounds = ball.hitbox.bottom > canvas.height;
if (ballIsOutOfBounds) {
// Game over logic
alert("Game over!");
location.reload();
return;
}Game over / notebook
Game over
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.