4 ms·
Can you give an example of a javascript hack that you have to deal with?
by MatthewPhillips 14y ago
Can you give an example of a javascript hack that you have to deal with?
- jcampbell1 14y agoI don't like having to manually check for globals. Other people's code tends to be loaded with missing 'vars'.
- MatthewPhillips 14y agoCoffeeScript won't fix other people's code for you.
- jcampbell1 14y agoIt does fix that specific issue.
- smokeyj 14y agoDealing with inconsistent API's across browsers.
- MatthewPhillips 14y agoCoffeeScript can't help you there.
- jcampbell1 14y agoIt can and does. Coffeescript will never write: ["dog","cat"].forEach(function(animal){ console.log(animal) }); Which will run just fine on your development browser, but will break for real customers. FYI, I don't use coffeescript, but I am at least aware of some problems with Javascript.
- MatthewPhillips 14y agoCoffeeScript will write that if you tell it to: [1, 2].forEach (i) => alert i
- oinksoft 14y agoArray.prototype.forEach and friends are trivial to shim and shouldn't be broken for anybody.
- emil0r 14y agoBut jQuery can. Which was the argument.