是的,因为函数也是对象。
让我们看一个例子:
let func = function(x) {
};
func.property1 = "Hello there";
console.log(func.property1);
输出:
Hello there
是的,因为函数也是对象。
让我们看一个例子:
let func = function(x) {
};
func.property1 = "Hello there";
console.log(func.property1);
输出:
Hello there