为什么调试器给你 "undefined is not a function" 而不是只告诉你 property/variable 不是函数的名称?
Why does debuggers give you "undefined is not a function" instead of just telling you the name of the property/variable that is not a function?
js 调试器给你 "undefined is not a function" 而不是仅仅告诉你 property/variable 不是函数的名称的原因是什么?
示例:
a = {
aFunction: function(){...}
notAFunction: "foo"
}
a.notAFunction()
给出:
undefined is not a function
这更有帮助:
property "notAFunction" of object "a" is not a function
确切的障碍是什么?
这很快就会改变,它可能也已经在 Canary 中了。
改进了异常消息:https://plus.google.com/+AddyOsmani/posts/DdWkiKsvbA2
js 调试器给你 "undefined is not a function" 而不是仅仅告诉你 property/variable 不是函数的名称的原因是什么?
示例:
a = {
aFunction: function(){...}
notAFunction: "foo"
}
a.notAFunction()
给出:
undefined is not a function
这更有帮助:
property "notAFunction" of object "a" is not a function
确切的障碍是什么?
这很快就会改变,它可能也已经在 Canary 中了。
改进了异常消息:https://plus.google.com/+AddyOsmani/posts/DdWkiKsvbA2