Could someone show me how to immediately invoke a function in CoffeeScript. I’m trying to accomplish something similar to this JS object literal.
WEBAPP = {
maxHeight : function(){
/* Calc stuff n' stuff */
WEBAPP.maxHeight = /* Calculated value */
}(),
someProperty : ''
/* ... */
}
Is it possible or what are the workarounds?
There is
do:Which compiles to