标签:var rop fun fine efi function writable 修改 define
function foo() { }
var oldName = foo.name;
foo.name = "bar";
[oldName, foo.name] ==> ["foo", "foo"]
function foo() { }
Object.defineProperty(foo,"name",{writable:true})//修改内置属性name
var oldName = foo.name;
foo.name = "bar";
[oldName, foo.name] ==> ["foo", "bar"]
标签:var rop fun fine efi function writable 修改 define
原文地址:https://www.cnblogs.com/onceweb/p/13396150.html