We are going to write a program in a language called Javascript. It will be in a separate file called game.js (for now). This file will be in the same folder (directory) as the HTML file but we need to add another element at the end of the HTML body, after the <canvas>
:
<script src="game.js"></script>
src
simply means source. The value of this attribute could be the path to the file. In larger projects we might well put Javascript files in a subdirectory, perhaps called js.
There are other ways to include some Javascript into an HTML page but this is the simplest.