So, I probably have a stupid question to ask about Coffee Script. I give him a second chance, but why does he return everything ?
What does the last statement / line of the function have to do with? and how do i disable this? Assuming a comment or something as the final "expression", I know that this is a "documented" function, but not; no, itβs not so, how can I not return everywhere? and save load / run time?
Is this behavior like jit over screws?
(locate = getPosition: () ->
Compiles
(function() { var locate; locate = { getPosition: function() { if (!navigator.geolocation) { throw Exception('Your browser doesn\'t support location based services!'); } return navigator.geolocation.getCurrentPosition(function(pos) { return console.log(pos); }); } }; }).call(this);
[change]
The reason I care is just one of the very large library for the application that I built if we say that 500 functions and 200 of them do something for dom instead of returning something like a number or object that an additional 200 returns is an additional 1.2 thousand data that I do not want or need.
In addition, the function without returning returns undefined and the function that returns null well, no need to explain it. If I were stupid enough to test this, it would be wrong in all directions.
I am sure that there will be some significant differences, but I do not know about it, and now I do not have time to execute some jsperfs, but I would be interested.

source share