Can someone explain this html switch code to me? : // I don't really understand the switch here, from what I know the switch function is supposed allow me to write certain cases and each case is supposed to redirect me to a function, this is an example from my college slides, are the cases numbered "1234","12345", "123" or are those the passwords the user might enter? //

    function login(){
     var username=document.myForm.userName.value;
     var password=document.myForm.pass.value;
    if ((username.length==0)||(password.length==0))
     { window.alert("Empty user name or password!");}
     else {
     switch(password)
     {
     case "12345" :
     window.location="page1.html";
     break;
     case "1234" :
     window.location="page2.html";
     break;
     case "123":
     window.location="page3.html";
     break;
     default:
     window.alert("Invalid Password");
     document.myForm.pass.select();
     }// end switch case
    }

