Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Action() {
- this.propertyPublic = 'public';
- var propertyPrivate = 'private';
- this.getPropertyPrivate = function() {
- return propertyPrivate;
- };
- }
- var someAction = new Action();
- console.log(someAction.propertyPublic); // "public"
- console.log(someAction.propertyPrivate); // undefined
- console.log(someAction.getPropertyPrivate()); // "private"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement