Javascript Password - Switch or if/else?

this is what the password Javascript ends up looking like:

{pwd = prompt(‘Enter your frendbox serial number’,’’);
if (pwd !== “”) {
hypeDocument.showSceneNamed(pwd, hypeDocument.kSceneTransitionCrossfade);
hypeDocument.showSceneNamed(“Denied”, hypeDocument.kSceneTransitionInstant);
} else {
hypeDocument.showSceneNamed(“Denied”, hypeDocument.kSceneTransitionInstant);
}
}

1 Like