mAKE JAVASCRIPT CODE to make a game

Sure, here is a simple game using JavaScript:

```html
<!DOCTYPE html>
<html>
<head>
<title>Simple Game</title>
</head>
<body>
<h1>Simple Game</h1>
<button onclick="startGame()">Start Game</button>
<p id="score">Score: 0</p>
<div id="gameArea"></div>

<script>
let score = 0;

function startGame() {
const gameArea = document.getElementById('gameArea');
gameArea.innerHTML = '';

const box = document.createElement('div');
box.style.width = '50px';
box.style.height = '50px';
box.style.backgroundColor = 'red';
box.style.position = 'absolute';
box.style.top = Math.floor(Math.random() * 400) + 'px';
box.style.left = Math.floor(Math.random() * 400) + 'px';
box.onclick = function() {
score++;
document.getElementById('score').innerText = 'Score: ' + score;
gameArea.removeChild(box);
};

gameArea.appendChild(box);
}
</script>
</body>
</html>
```

In this game, a red box will appear on the screen randomly each time you click the "Start Game" button. When you click on the box, your score will increase by 1. The game will keep track of your score as you continue to play.

Redo the code to make the start game work

Certainly! Here is the revised code where clicking on the "Start Game" button will create a red box on the screen. You can click on the red box to increase your score:

```html
<!DOCTYPE html>
<html>
<head>
<title>Simple Game</title>
<style>
#gameArea {
width: 500px;
height: 500px;
border: 1px solid black;
position: relative;
}
.box {
width: 50px;
height: 50px;
background-color: red;
position: absolute;
cursor: pointer;
}
</style>
</head>
<body>
<h1>Simple Game</h1>
<button onclick="startGame()">Start Game</button>
<p id="score">Score: 0</p>
<div id="gameArea"></div>

<script>
let score = 0;

function startGame() {
const gameArea = document.getElementById('gameArea');
gameArea.innerHTML = '';

const box = document.createElement('div');
box.setAttribute('class', 'box');
box.style.top = Math.floor(Math.random() * 450) + 'px';
box.style.left = Math.floor(Math.random() * 450) + 'px';
box.onclick = function() {
score++;
document.getElementById('score').innerText = 'Score: ' + score;
gameArea.removeChild(box);
};

gameArea.appendChild(box);
}
</script>
</body>
</html>
```

Now when you click the "Start Game" button, a red box will appear randomly on the game area. Each time you click on the box, your score will increase by 1. Have fun playing!