Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Car() {
- /* private static variables */
- (function() {
- var static = 5;
- Car.prototype,staticMethod = function() {
- return static;
- };
- });
- /* private instance variables */
- var parts = [];
- /* privileged methods*/
- this.getCars = function(){
- return strings;
- }
- }
- Car.prototype.pop = function() {
- return this.getCars().pop();
- }
- Car.prototype.push = function(elem) {
- this.getCars().push(elem);
- }
Add Comment
Please, Sign In to add comment