Answer the question
In order to leave comments, you need to log in
How to fix the problem with closing function body ';' on coffeescript or something else?
Good evening!
I am using the zeptojs library.
As I noticed, each individual module starts with the lines: ;(function() {})
And the last one does not contain a closing ;
, which causes problems when building all js.
I write in coffeescript, the compiler perceives such code as if there is no ;
. ;(function () {})
== ->
How to fix this situation?
Answer the question
In order to leave comments, you need to log in
Swears, because. two brackets ") (" in a row. In JS, this means a function call and a line break is not taken into account. Specify a separator for the "compiler".
Lately, it's fashionable to start modules not with ";", but with "!". An anonymous function will still be executed, despite to denial.!(function () {})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question