hasOwnProperty()

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

obj.hasOwnProperty('prop')

posted @ 2021-03-10 17:54  李逍遥701  阅读(55)  评论(0)    收藏  举报