本文介绍了CallExpression和MemberExpression之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 有什么区别?我查看了ECMAScript规范,但不明白。真正有用的代码示例。What is the difference? I looked at the ECMAScript specification, but did not understand. The real code examples that would help much.如果你能在这里解释每一行就会很好If you can explain every line here it would be niceMemberExpression : PrimaryExpression FunctionExpression MemberExpression [ Expression ] MemberExpression . IdentifierName CallExpression : MemberExpression Arguments CallExpression Arguments CallExpression [ Expression ] CallExpression . IdentifierName例如console.log - MemberExpression: MemberExpression . IdentifierNameconsole.log("hi") - CallExpression : MemberExpression Arguments什么是遗嘱相等CallExpression : CallExpression . IdentifierNameCallExpression [ Expression ]CallExpression : CallExpression Arguments ES的链接 http://www.ecma-international.org/ecma-262/ 5.1 /#sec-11.2 推荐答案此处的相关部分是NewExpression: MemberExpression new NewExpressionLeftHandSideExpression: NewExpression CallExpression区分三个主要的左手边表达式:which distinguishes the three major left hand side expressions: 构造函数调用 函数/方法调用 主要表达式 所有这些成员访问在正确的位置。因此,您列出的产品之间的差异只是 CallExpression 总是包含一个调用 - 因此可能不是之后的表达式的一部分新的运营商。And all of them with member accesses in the right places. As such, the difference between the productions you listed is just that a CallExpression always contains a call - and may therefore not be part of the expression after a newoperator. 这篇关于CallExpression和MemberExpression之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 11-03 06:18