Advertisement
Guest User

Untitled

a guest
Apr 17th, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function Action() {
  2. this.propertyPublic = 'public';
  3. var propertyPrivate = 'private';
  4. this.getPropertyPrivate = function() {
  5. return propertyPrivate;
  6. };
  7. }
  8.  
  9. var someAction = new Action();
  10. console.log(someAction.propertyPublic); // "public"
  11. console.log(someAction.propertyPrivate); // undefined
  12. console.log(someAction.getPropertyPrivate()); // "private"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement