How do I define global variables in CoffeeScript?

后端 未结 8 2185
说谎
说谎 2020-11-22 05:41

On Coffeescript.org:

bawbag = (x, y) ->
    z = (x * y)

bawbag(5, 10) 

would compile to:

var bawbag;
bawbag = function(         


        
8条回答
  •  青春惊慌失措
    2020-11-22 05:53

    You can pass -b option when you compile code via coffee-script under node.js. The compiled code will be the same as on coffeescript.org.

提交回复
热议问题