I am having this strange issue at times when using coffeescript. Example below:
Coffeescript:
$scope.function1 = () ->
console.log("function 1")
$scope.function2 = () ->
console.log("function 2")
Javascript:
$scope.function1 = function() {
console.log("function 1");
return $scope.function2 = function () {
console.log("function 1");
}
Why is the second function goes inside the first one? Any help with this is highly appreciated. It is not happening all the time though.