Advertisement
Guest User

Untitled

a guest
Mar 11th, 2015
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var Shapes = (function () {
  2.     var Shape = (function () {
  3.       }
  4.  
  5.     Shape.prototype.toString = function () {};
  6.  
  7.     return Shape;
  8.     }());
  9.  
  10.     var Circle = (function () {
  11.       function Circle () {
  12.       }
  13.  
  14.         Circle.extends(Shape);
  15.  
  16.         Circle.prototype.toString = function() {
  17.           Shape.prototype.toString.call(this);
  18.       // ....
  19.         };
  20.  
  21.         return Circle;
  22.     }());
  23.  
  24.     var Rectangle = (function () {
  25.       function Rectangle () {
  26.       }
  27.  
  28.         Rectangle.extends(Shape);
  29.  
  30.         Rectangle.prototype.toString = function() {
  31.           Shape.prototype.toString.call(this);
  32.           // ...
  33.         };
  34.  
  35.         return Rectangle;
  36.     }());
  37.  
  38.     return {
  39.       Shape: Shape,
  40.       Circle: Circle,
  41.       Rectangle: Rectangle
  42.     };
  43.  
  44. }());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement