Home › Forums › JavaScript › problem with switch › Reply To: problem with switch
October 21, 2013 at 5:27 pm
#153646
Alen
Participant
function showMaxSpeed(s){
switch(s){
case "bmw":
alert("300mph");
break;
case "ford":
alert("250mph");
break;
case "dodge":
alert("220mph");
break;
}
}
showMaxSpeed("ford"); // 250mph