JavaScript - ' x'不是功能
在我的JavaScript文件中,我正在调用函数b
内部功能a
。我得到以下错误
b不是函数
。
如何解决此错误?
exports.createRecord = function A() {
B();
};
exports.B = () =>{
}
In my javascript file I am calling function B
inside function A
. I get the following error
B is not a function
.
How can I resolve this error?
exports.createRecord = function A() {
B();
};
exports.B = () =>{
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将属性分配给对象不会将该属性的名称作为独立标识符。出于类似的原因,以下内容也会失败:
Module.Exports
只是具有相同行为的对象。要么
或
Assigning a property to an object does not put that property's name into scope as a standalone identifier. For similar reasons, the following will fail too:
And
module.exports
is just an object with the same sort of behavior.Either do
or