首页 > 应用开发 > > 一个js问题。。。
varanimal={
name:"animal",
maxAge:15,
eat:["plant","sun"]
}
vardog = Object.create(animal);
console.log(dog)
dog.name="dog";
为什么赋值语句在输出语句之后还被赋值了?
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2331/viewspace-3155495/ ,如需转载,请注明出处,否则将追究法律责任。
注册时间:2019-09-06