Created
September 26, 2014 09:18
-
-
Save RobinStamer/753e19310fee6104b4e8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| > f1 = function(a, b) { return !a && b || a && !b } | |
| > f2 = function(a, b) { return a ^ b } | |
| > a1 = [0,0,1,1]; a2 = [0,1,0,1]; for (var i = 0; i < 4; ++i) { console.log(!!f1(a1[i], a2[i]) + '\t' + !!f2(a1[i], a2[i])) } | |
| false false | |
| true true | |
| true true | |
| false false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment