JavaScript 函数
function func() {
func.method(func.attr);
}
func.attr = 'a';
func.method = function (a) {
console.log(a);
}
func(); // afunction func() {
const x = 'can you see me?'
return function innerFunc() {
console.log(x);
}
}
func()(); // can you see me?方法链
补充说明
最后更新于