Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有人遇到过下面在 javascript 或 jquery 中给出的函数语法。它在我的项目中,我无法弄清楚它是什么。
function a::b(arg1, arg2) {}
不,那是无效的 javascript。因此,如果您遇到这样的语法,您有两种选择:
您可以使用普通功能
函数 xyz(){} 或者你可以使用单例
xyz:函数(){}
这是无效的 javascript 语法: