W momencie używania const w bracketsie wyskakuje mi taki błąd "Expected an identifier and instead saw 'const'".
Kod źródłowy:
const canvas = document.getElementById('can');
const ctx = canv.getContext('2d');
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src=""></script>
<title>tenis</title>
</head>
<body>
<canvas id="can"></canvas>
<script type="text/javascript" src="js/tenis.js"></script>
</body>
</html>