hasOwnProperty()

明确某属性是否在某对象自身上

obj.hasOwnProperty('prop')

posted @ 2021-03-10 17:54  呈心者  阅读(49)  评论(0编辑  收藏  举报