<script>
console.log('Heyyy');
</script>

Always try to have your script tag before the closing body tag, because we can access the HTML elements written above the script tag as they are above the JS.

<script src='relative path to js file'></script>