Coffeescript:
window.someList = [1, 2, 3, 4, 5] addOne = (item) -> 1 + item window.runThings = () -> addOne item for item in someList
Coffeescript compiled to JavaScript:
(function() { var addOne; window.someList = [1, 2, 3, 4, 5]; addOne = function(item) { return 1 + item; }; window.runThings = function() { var item, _i, _len, _results; _results = []; for (_i = 0, _len = someList.length; _i < _len; _i++) { item = someList[_i]; _results.push(addOne(item)); } return _results; }; }).call(this);