Guest User

Untitled

a guest
Feb 13th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. var myObject = function () {
  2. var value = 0;
  3.  
  4. return {
  5. increment: function (inc) {
  6. value += typeof inc === 'number' ? inc : 1;
  7. },
  8. getValue: function () {
  9. return value;
  10. }
  11. };
  12. }();
Add Comment
Please, Sign In to add comment