Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created September 4, 2016 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/097bf48f4319b6c92f68475fda2edba9 to your computer and use it in GitHub Desktop.
Save codecademydev/097bf48f4319b6c92f68475fda2edba9 to your computer and use it in GitHub Desktop.
Codecademy export
var answer = prompt("How many days in month?");
switch(answer) {
case 'January' || 'March' || 'May' || 'July' || 'August' || 'October' || 'December':
console.log("It is a 31 days month");
break;
case 'February':
console.log("February is 28/29 days month");
break;
case 'April' || 'June' || 'September' || 'November':
console.log("It is a 30 days month");
break;
default:
console.log("I am not sure, please check your spelling");
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment