摘要: 为对象添加原型 const obj = { x:1, y:2, add:function(a, b){ return a + b } } 使用prototype添加原型 const Empty = function(){} Empty.prototype = obj const empty = ne 阅读全文
posted @ 2021-11-27 23:36 邢韬 阅读(51) 评论(0) 推荐(0) 编辑