diff --git a/documentation/cs/super.cs b/documentation/cs/super.cs index 21c89a26..2c97fb99 100644 --- a/documentation/cs/super.cs +++ b/documentation/cs/super.cs @@ -3,13 +3,13 @@ Animal.prototype.move: meters => alert(this.name + " moved " + meters + "m."). Snake: name => this.name: name. -Snake extends new Animal() +Snake.prototype: new Animal() Snake.prototype.move: => alert("Slithering...") super(5). Horse: name => this.name: name. -Horse extends new Animal() +Horse.prototype: new Animal() Horse.prototype.move: => alert("Galloping...") super(45). diff --git a/documentation/js/array_comprehensions.js b/documentation/js/array_comprehensions.js index 75242df7..3fcbd836 100644 --- a/documentation/js/array_comprehensions.js +++ b/documentation/js/array_comprehensions.js @@ -1,4 +1,6 @@ (function(){ + + // Eat lunch. var lunch; var a = ['toast', 'cheese', 'wine']; var d = []; @@ -7,6 +9,7 @@ d[b] = food.eat(); } lunch = d; + // Zebra-stripe a table. var e = table; for (var f=0, g=e.length; f alert(this.name + " moved " + meters + "m."). Snake: name => this.name: name. -Snake extends Animal +Snake.prototype: Animal Snake.prototype.move: => alert('Slithering...') super(5). Horse: name => this.name: name. -Horse extends Animal +Horse.prototype: Animal Horse.prototype.move: => alert('Galloping...') super(45). diff --git a/index.html b/index.html index 11480003..63b99d6a 100644 --- a/index.html +++ b/index.html @@ -275,7 +275,9 @@ lunch: food.eat() for # Zebra-stripe a table. highlight(row) for row, i in table if i % 2 is 0. -
var lunch;
+
+// Eat lunch.
+var lunch;
 var a = ['toast', 'cheese', 'wine'];
 var d = [];
 for (var b=0, c=a.length; b<c; b++) {
@@ -283,6 +285,7 @@ highlight(row) for row, i in<
   d[b] = food.eat();
 }
 lunch = d;
+// Zebra-stripe a table.
 var e = table;
 for (var f=0, g=e.length; f<g; f++) {
   var row = e[f];
@@ -333,7 +336,6 @@ tom: new var Animal = function() {
-
 };
 Animal.prototype.move = function(meters) {
   return alert(this.name + " moved " + meters + "m.");
@@ -359,7 +361,6 @@ tom.move()
 sam.move();
 tom.move();