code for simple game

JAVASCRIPT

<!DOCTYPE html>

<html>
<head>
<title>Simple Game</title>
</head>
<body>
<h1>Simple Game</h1>

<p id="score">Score: 0</p>
<button id="startButton">Start Game</button>

<script>
let score = 0;

document.getElementById("startButton").addEventListener("click", function() {
alert("Game Started!");

setInterval(function() {
score++;
document.getElementById("score").innerText = "Score: " + score;
}, 1000);
});
</script>
</body>
</html>