3 ms·
A nice example on Node. Only I don't quote get the ',' syntax. Is it a scoping thing?
by thomasahle 13y ago
A nice example on Node. Only I don't quote get the ',' syntax. Is it a scoping thing?
- jbrooksuk 13y agoIt's a Coffee syntax thing. ws.on 'close', -> ps.kill() That compiles to: ws.on('close', function() { return ps.kill(); });
- thu 13y agoI have never done any Coffee but it looks like arguments are separated by commas, and, in this case, the second argument is a function of no argument (so the left hand side of the arrow is empty). Edit: it was meant to be a reply to the parent.