funName = () -> $(\".foo\").addClass(\"bar\");
Compiles into the scope of an anonymous function. Calling funName from the console res
funName
If you want to create a global funName try using root = exports ? this and then root.funName = ... as described at How do I define global variables in CoffeeScript?
root = exports ? this
root.funName = ...