Skip to content

Instantly share code, notes, and snippets.

@heymichaelp
Last active August 29, 2015 14:02
Show Gist options
  • Save heymichaelp/3382c950048469a8661f to your computer and use it in GitHub Desktop.
Save heymichaelp/3382c950048469a8661f to your computer and use it in GitHub Desktop.
Value Objects: Example
var myGrade = new Grade(0.65);
alert('My Grade is ' + myGrade + '!'); // alerts, 'My Grade is 0.65!'
var myOtherGrade = new Grade(0.75);
myGrade < myOtherGrade; // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment