Javascript Error Message: is not a function

This error message appears when you use Varibalized Function (or called Function Literal, Function Reference, Function Pointer) method to declare function while you did not put into right order:

(Caller here)
; var func = function()
{
...
}

Solution 1:

; var func
(Caller here)
; func = function()
{
...
}

Solution 2:

(Caller here)
; function func()
{
...
}


http://www.dustindiaz.com/javascript-function-declaration-ambiguity/
Function Declaration in JavaScript

No comments:

Post a Comment

Labels