Last active
August 29, 2015 14:02
-
-
Save heymichaelp/da152f7c1ca09f41c656 to your computer and use it in GitHub Desktop.
Value Objects: Example
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
// Primitives | |
var foo = 2; | |
var bar = 2; | |
foo === bar; // => true | |
// Object identity | |
var foo = new Number(2); | |
var bar = new Number(2); | |
foo === bar; // => false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment