我在阅读一些关于 JavaScript 保留关键字的在线资料时,遇到了 package
这个词。
我找不到任何清晰的在线资料来解释它的用途。
最佳答案
它是保留的,但不一定使用(好吧,至少在撰写本文时不是)。
The following are reserved as future keywords by the ECMAScript specification. They have no special functionality at present, but they might at some future time, so they cannot be used as identifiers. (Note that for the moment Mozilla reserves these keywords only in strict mode code. Most other browsers reserve these keywords in all code, whether strict or not, so their use is very much non-portable. Mozilla will likely reserve these keywords in normal code in a future release, to conform to the specification and to be consistent with other browsers).
Source .
关于javascript - Javascript Package 关键字的用途是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6167418/