у меня есть такой HTML:
<body>
<div>
<canvas
id='game'
width='600px'
height='400px'
style='
margin: auto;
margin-top: 40px;
display: block;
background-color: #252734;
box-shadow: 0 0 10px rgba(0,0,0,0.5);
'
/></canvas>
<script src='game.js'></script>
</div>
</body>
И такой JS:
const canvas = document.getElementById("game");
const ctx = canvas.getContext('2d');
И ошибка: