The following CoffeeScript code:
do (a) ->
console.log a
generates this:
(function(a) {
return console.log(a);
})(a);
How do I pass a value to a like this?
(function(a) {
return console.log(a);
})("hello");
The following CoffeeScript code:
do (a) ->
console.log a
generates this:
(function(a) {
return console.log(a);
})(a);
How do I pass a value to a like this?
(function(a) {
return console.log(a);
})("hello");