Object学习

128 阅读1分钟

1、Object.assign('目标对象', ...'源对象')

Object.assign(target,...sources)

2、Object.prototype.hasOwnProperty()

obj.hasOwnProperty(prop)   判断obj中是否有prop属性