External JavaScript file
Writing JavaScript on it's own file and call this file at the end gives us a massive performance boost, as we don't affect the presentation and the appearance of our page with scripts and code that it could run later.
As the picture suggests, we introduce a <script> tag by specifying the source path. There inside we write exclusively JS without mixing documents, languages and technologies.