Answer the question
In order to leave comments, you need to log in
Is CoffeeScript a global function?
Hello. I decided to transfer the project on Ruby on Rail from JS to CoffeeScript, and then there was a problem with the scope of functions. A function declared in one file is not visible in another. As I understand it, this is due to the closure area that is created when compiling from CoffeeScript to JS
(function() {
var beginning_of_month;
beginning_of_month = function() {
return console.log("test");
};
}).call(this);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question