Skip to content

Commit

Permalink
Update super.md
Browse files Browse the repository at this point in the history
Fixes docs
  • Loading branch information
justinbmeyer committed Mar 18, 2013
1 parent 7b869db commit c6f5b22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions construct/super/super.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ The __super__ provides a `this._super` reference in functions that points to the
the following creates a `Vehicle` constructor and `Car` constructor that
inherits from it. `Car`'s `init` function calls `Vehicle`'s base `init` function.

var Vehicle = can.Construct({
var Vehicle = can.Construct({
init: function(wheels){
this.wheels=wheels;
}
});

var Car = can.Construct({
var Car = Vehicle({
init: function(speed){
this._super(4);
this.speed = speed;
Expand Down Expand Up @@ -43,4 +43,4 @@ If you want to pass all arguments to `_super` use
this._super.apply(this, arguments);
this.isEvenbetter = true;
}
});
});

0 comments on commit c6f5b22

Please sign in to comment.