To add JavaScript code to a webpage, we start with the <script>
and </script>
tags.
<body>
<script></script>
</body>
The script
element is the last element before the closing </body>
tag in the HTML structure.
<body>
<h3>Tweeter</h3>
<script></script>
</body>
In the JS file, we can write JavaScript like const username = "Lee";
.
<body>
<h3>Tweeter</h3>
<script src="script.js"></script>
</body>
const username = "Lee";