Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.6k views
in Technique[技术] by (71.8m points)

`a=[]`的原型是什么,原型的原型是什么

a=[]的原型是什么,原型的原型是什么


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
var a = [];
var protoOfA = Object.getPrototypeOf(a);
console.log(protoOfA  === Array.prototype) // true

var protoOfProtoOfA = Object.getPrototypeOf(protoOfA);
console.log(protoOfProtoOfA === Object.prototype) // true

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...