I tried variety of script tags position in HTML file but the js codes still not works. How exactly to link the js file with the HTML file?
//below is my HTML file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="new.css">
<script src="https://kit.fontawesome.com/0db4f2ae99.js" crossorigin="anonymous"></script>
<title>little blog</title>
</head>
<body>
<div class="header">
<h2>No Context blog</h2>
<button class="hamburger" id="hamburger">
<i class="fas fa-bars"></i>
</button>
<ul class="nav-ul" id="nav-ul">
<li><a href="#">About me</a></li>
<li><a href="#">About me</a></li>
<li><a href="#">About me</a></li>
</ul>
</div>
<script src="new.js"></script>
</body>
</html>```
//end of HTML file
//this is my js file contents
const hamburger = document.getElementById(‘hamburger’);
const navUL = document.getElementById(‘nav-ul’);
hamburger.addEventListener(‘click’,() => {
navUL.classList.toggle(‘show’);
})