问题
What is the reason js debuggers gives you "undefined is not a function" instead of just telling you the name of the property/variable that is not a function?
example:
a = {
aFunction: function(){...}
notAFunction: "foo"
}
a.notAFunction()
Gives:
undefined is not a function
This is more helpful:
property "notAFunction" of object "a" is not a function
What are the exact obstacles?
回答1:
This is going to be changing very soon, it might already be in Canary too.
Improved exception messages: https://plus.google.com/+AddyOsmani/posts/DdWkiKsvbA2
来源:https://stackoverflow.com/questions/28612341/why-does-debuggers-give-you-undefined-is-not-a-function-instead-of-just-tellin