diff --git a/documentation/js/array_comprehensions.js b/documentation/js/array_comprehensions.js index cdf1e8e2..f32d5b3b 100644 --- a/documentation/js/array_comprehensions.js +++ b/documentation/js/array_comprehensions.js @@ -1,21 +1,21 @@ (function(){ - var _a, _b, _c, _d, _e, _f, _g, food, lunch, roid, roid2; + var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, food, lunch, roid, roid2; // Eat lunch. lunch = (function() { _a = []; _b = ['toast', 'cheese', 'wine']; - for (_c = 0; _c < _b.length; _c++) { + for (_c = 0, _d = _b.length; _c < _d; _c++) { food = _b[_c]; _a.push(eat(food)); } return _a; }).call(this); // Naive collision detection. - _d = asteroids; - for (_e = 0; _e < _d.length; _e++) { - roid = _d[_e]; - _f = asteroids; - for (_g = 0; _g < _f.length; _g++) { - roid2 = _f[_g]; + _e = asteroids; + for (_f = 0, _g = _e.length; _f < _g; _f++) { + roid = _e[_f]; + _h = asteroids; + for (_i = 0, _j = _h.length; _i < _j; _i++) { + roid2 = _h[_i]; if (roid !== roid2) { if (roid.overlaps(roid2)) { roid.explode(); diff --git a/documentation/js/cake_tasks.js b/documentation/js/cake_tasks.js index ab96a5b9..07d1b62d 100644 --- a/documentation/js/cake_tasks.js +++ b/documentation/js/cake_tasks.js @@ -1,9 +1,9 @@ (function(){ process.mixin(require('assert')); task('test', 'run each of the unit tests', function() { - var _a, _b, _c, test; + var _a, _b, _c, _d, test; _a = []; _b = test_files; - for (_c = 0; _c < _b.length; _c++) { + for (_c = 0, _d = _b.length; _c < _d; _c++) { test = _b[_c]; _a.push(fs.readFile(test, function(err, code) { return eval(coffee.compile(code)); diff --git a/documentation/js/overview.js b/documentation/js/overview.js index 7f8c01a6..6164287d 100644 --- a/documentation/js/overview.js +++ b/documentation/js/overview.js @@ -1,5 +1,5 @@ (function(){ - var _a, _b, _c, cubed_list, list, math, num, number, opposite_day, race, square; + var _a, _b, _c, _d, cubed_list, list, math, num, number, opposite_day, race, square; // Assignment: number = 42; opposite_day = true; @@ -34,7 +34,7 @@ // Array comprehensions: cubed_list = (function() { _a = []; _b = list; - for (_c = 0; _c < _b.length; _c++) { + for (_c = 0, _d = _b.length; _c < _d; _c++) { num = _b[_c]; _a.push(math.cube(num)); } diff --git a/documentation/js/range_comprehensions.js b/documentation/js/range_comprehensions.js index 848f63fe..9ec8bb4a 100644 --- a/documentation/js/range_comprehensions.js +++ b/documentation/js/range_comprehensions.js @@ -2,7 +2,7 @@ var _a, _b, _c, _d, _e, countdown, egg_delivery, num; countdown = (function() { _a = []; _d = 10; _e = 1; - for (_c = 0, num=_d; (_d <= _e ? num <= _e : num >= _e); (_d <= _e ? num += 1 : num -= 1), _c++) { + for (_c = 0, num = _d; (_d <= _e ? num <= _e : num >= _e); (_d <= _e ? num += 1 : num -= 1), _c++) { _a.push(num); } return _a; @@ -10,7 +10,7 @@ egg_delivery = function egg_delivery() { var _f, _g, _h, _i, _j, dozen_eggs, i; _f = []; _i = 0; _j = eggs.length; - for (_h = 0, i=_i; (_i <= _j ? i < _j : i > _j); (_i <= _j ? i += 12 : i -= 12), _h++) { + for (_h = 0, i = _i; (_i <= _j ? i < _j : i > _j); (_i <= _j ? i += 12 : i -= 12), _h++) { _f.push((function() { dozen_eggs = eggs.slice(i, i + 12); return deliver(new egg_carton(dozen)); diff --git a/index.html b/index.html index 370d7933..d49b61a7 100644 --- a/index.html +++ b/index.html @@ -133,7 +133,7 @@ alert "I knew it!# Array comprehensions: cubed_list: math.cube num for num in list -
var _a, _b, _c, cubed_list, list, math, num, number, opposite_day, race, square;
+
var _a, _b, _c, _d, cubed_list, list, math, num, number, opposite_day, race, square;
 // Assignment:
 number = 42;
 opposite_day = true;
@@ -168,13 +168,13 @@ race = function // Array comprehensions:
 cubed_list = (function() {
   _a = []; _b = list;
-  for (_c = 0; _c < _b.length; _c++) {
+  for (_c = 0, _d = _b.length; _c < _d; _c++) {
     num = _b[_c];
     _a.push(math.cube(num));
   }
   return _a;
 }).call(this);
-