Why is my code not working when I'm trying to show and hide the navbar

HTML:
<!doctype html>

navbar
  • Home

CSS:

.container{
background-color: black;
height:100vh;
width:0vw;

}

JS:
let btn=0; //hidden

button=()=>{
if(btn!=0){
document.getElementsByClassName(‘container’).style.width(‘100%’)

document.getElementsByClassName('list').style.display('block')

   btn=1;
}

else{
document.getElementsByClassName(‘container’).style.width(‘0%’)
document.getElementsByClassName(‘list’).style.display(‘none’)
btn=0

}
}