/******************************************************************************/
// <<: new
var Rectangle = function(width, height) {
  this.width  = width;
  this.height = height;
};

Rectangle.prototype.area = function() {
  return this.width * this.height;
};

var Square = function(width) {
  Rectangle.call(this, width, width);
  this.isSquare = true;
};

Square.prototype = Object.create(Rectangle.prototype);
Square.prototype.sideSize = function() {return this.width;};

var sq = new Square(10);
console.log(sq.area());
// :>>

@@ -81,19 +81,19 @@
 %0A// %3C%3C: 
-new
+rec
 %0Avar Rec
@@ -253,24 +253,102 @@
 height;%0A%7D;%0A%0A
+var rect = new Rectangle(10, 20);%0Aconsole.log(rect.area());%0A// :%3E%3E%0A%0A// %3C%3C: sq%0A
 var Square =

Add slides to cover inheritance in JS