Sidenavbar js

   var menu = document.getElementById('menu');
    var sidenav = document.getElementById('sidenav');
    sidenav.style.right = "-300px";

    menu.onclick = function () {
        if (sidenav.style.right = "-300px")
            sidenav.style.right = "0px"
    }

    else {
        sidenav.style.right = "-300px"
    }`enter code here`
Obnoxious Osprey