Skip to content

Instantly share code, notes, and snippets.

@diklein
Last active October 4, 2016 02:37
Show Gist options
  • Save diklein/c04084fe8c91eacee4b4988dbf71e7c0 to your computer and use it in GitHub Desktop.
Save diklein/c04084fe8c91eacee4b4988dbf71e7c0 to your computer and use it in GitHub Desktop.
var grade = prompt("What's the grade?");
switch (grade) {
case "A": case "B": case "C": case "D":
console.log("Pass");
break;
case "F":
console.log("Fail");
break;
default:
console.log("Error");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment