Skip to content

Instantly share code, notes, and snippets.

@heymichaelp
Last active August 29, 2015 14:02
Show Gist options
  • Save heymichaelp/da152f7c1ca09f41c656 to your computer and use it in GitHub Desktop.
Save heymichaelp/da152f7c1ca09f41c656 to your computer and use it in GitHub Desktop.
Value Objects: Example
// 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