Guest User

Untitled

a guest
Aug 16th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. function Car() {
  2.  
  3. /* private static variables */
  4. (function() {
  5. var static = 5;
  6. Car.prototype,staticMethod = function() {
  7. return static;
  8. };
  9. });
  10.  
  11. /* private instance variables */
  12. var parts = [];
  13.  
  14. /* privileged methods*/
  15. this.getCars = function(){
  16. return strings;
  17. }
  18.  
  19. }
  20.  
  21. Car.prototype.pop = function() {
  22. return this.getCars().pop();
  23. }
  24.  
  25. Car.prototype.push = function(elem) {
  26. this.getCars().push(elem);
  27. }
Add Comment
Please, Sign In to add comment