I have read this but there is no answer for my question: var functionName = function() {} vs function functionName() {}
Suppose I have a function variable and would like to call it in an if statement.
var myFunc = function() {
// very long code
}
if (true) myFunc;
Of course the above if statement would not work. How do I do that? Thanks.