3 ms·
...Coffeescript was designed specifically to compile 1:1 to matching js possibly initially, but there's a lot of constructs in coffeescript that aren't in js e
by cubicle67 15y ago
...Coffeescript was designed specifically to compile 1:1 to matching js
possibly initially, but there's a lot of constructs in coffeescript that aren't in js eg existential operator
solipsism = true if mind? and not world?
compiles to
var solipsism;
if ((typeof mind !== "undefined" && mind !== null) && !(typeof world !== "undefined" && world !== null)) {
solipsism = true;
}
see also splats http://jashkenas.github.com/coffee-script/#splats http://jashkenas.github.com/coffee-script/#splats, function binding and comprehensions over collections eg
eat food for food in ['toast', 'cheese', 'wine']