JS一些實用方法介紹(hasOwnProperty()、Array.isArray()、Object.entries()、Reflect.set())

1.hasOwnProperty() hasOwnProperty() 方法會返回一個布爾值,指示對象自身屬性中是否具備指定的屬性數組 舉例:this let tempObj ={propName:'666'};spa tempObj.propName2 ='999'code console.log(tempObj.hasOwnProperty('propName'))//返回true對象 con
相關文章
相關標籤/搜索