Skip to content

Instantly share code, notes, and snippets.

@beacrea
Last active August 29, 2015 14:05
Show Gist options
  • Save beacrea/96d7322bae15376e5e21 to your computer and use it in GitHub Desktop.
Save beacrea/96d7322bae15376e5e21 to your computer and use it in GitHub Desktop.
A simple case statement indicating when to ___ it like it's hot. You're welcome, world.
var situation = 'pigs';
var conditionEnd = ' like it\'s hot.';
switch (situation) {
case 'pigs':
alert('Park it' + conditionEnd);
break;
case 'pimps':
alert('Drop it' + conditionEnd);
break;
case 'ngAttitude':
alert('Pop it' + conditionEnd);
break;
default:
alert('I got the rolly on my arm and I\'m pouring Chandon.');
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment