I have next function
var hideAll = function() {
// code
return ///...
};
And I am using this function like callback in another function.
When I am using it like
function (params, hideAll) {}
all working well, but when I am using
function (params, hideAll() ) {}
all not working well!
So my question is, what is difference between hideAll and hideAll() function executions?
hideAll– this is a reference to the functionhideAll()– this is execution of the function, its resultfunction (params, hideAll) {}is a correct function definition,whereas
function (params, hideAll() ) {}is not – you are unable to call another function in function definition.However you could still write the following valid code: