Sha256: 3f26048adadab7050fc3148f4f5d5a589bf65ea93a750e5052cc838577e1c6c0

Contents?: true

Size: 933 Bytes

Versions: 3

Compression:

Stored size: 933 Bytes

Contents

(function(){
  var _a, _b, _c, cubed_list, list, math, num, number, opposite_day, race, square;
  // Assignment:
  number = 42;
  opposite_day = true;
  // Conditions:
  if (opposite_day) {
    number = -42;
  }
  // Functions:
  square = function square(x) {
    return x * x;
  };
  // Arrays:
  list = [1, 2, 3, 4, 5];
  // Objects:
  math = {
    root: Math.sqrt,
    square: square,
    cube: function cube(x) {
      return x * square(x);
    }
  };
  // Splats:
  race = function race(winner) {
    var runners;
    runners = Array.prototype.slice.call(arguments, 1);
    return print(winner, runners);
  };
  // Existence:
  if ((typeof elvis !== "undefined" && elvis !== null)) {
    alert("I knew it!");
  }
  // Array comprehensions:
  cubed_list = (function() {
    _a = []; _b = list;
    for (_c = 0; _c < _b.length; _c++) {
      num = _b[_c];
      _a.push(math.cube(num));
    }
    return _a;
  }).call(this);
})();

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
haml-more-0.4.0.c vendor/coffee-script/documentation/js/overview.js
haml-more-0.4.0.b vendor/coffee-script/documentation/js/overview.js
haml-more-0.4.0.a vendor/coffee-script/documentation/js/overview.js