Live CoffeeScript coding experiments
Use function : _ (underscore) to display in output
- (function() {
- var i, obj, tablo, _base;
- _('"Please modify this code to create errors"');
- _("Begining Test");
- _(tablo = (function() {
- var _results;
- _results = [];
- for (i = 0; i <= 10; i++) {
- if (!(i % 2)) _results.push(i);
- }
- return _results;
- })());
- _("" + tablo.slice(2, 5) + " | " + tablo.slice(4));
- obj = {
- me: {
- firstname: "evan",
- lastname: "genieur",
- nickname: function() {
- return "" + this.firstname + this.lastname;
- }
- }
- };
- _(typeof (_base = obj.me).nickname === "function" ? _base.nickname() : void 0);
- _(obj.me.nickname.toString());
- console.log(obj);
- }).call(this);
- "Please modify this code to create errors"
- Begining Test
- 0,2,4,6,8,10
- 4,6,8 | 8,10
- evangenieur
- function () {
- return "" + this.firstname + this.lastname;
- }