Created
January 5, 2015 02:33
-
-
Save mfunkie/1efbfa3d570c83defab8 to your computer and use it in GitHub Desktop.
I hate myself for this
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var items = [1, 2, 3, 4]; | |
switch (true) { | |
case 2 === items.filter(function(item) { return item > 2; }).length: | |
console.log('Two items greater than two'); | |
break; | |
default: | |
console.log('Not exactly two items greater than two'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment