At the moment when the menu button is clicked the dropdown displays, however, clicking the button once more does not hide the dropdown menu as it should.
Script.js
//Variables
var menuBtn = document.getElementById('menu__icon');
var dropdown = document.getElementsByClassName('dropdown__menu')[0];
var isClicked = false;
// Drop down Mobile
menuBtn.addEventListener('click', function () {
if (isClicked == false) {
//Btn Styles
menuBtn.style.backgroundColor = "none";
menuBtn.style.color = "black";
//Menu visible
dropdown.style.display = "none";
} else {
isClicked = true;
//Btn Styles
menuBtn.style.backgroundColor = "#1f283b";
menuBtn.style.color = "black";
//Menu visible
dropdown.style.display = "block";
}
});