//I am trying to write the source code of hasOwnProperty
et k={h:1,b:2}
Object.prototype.hasOwnPropertys=function(property){
let value=-1
for( let i in this){
if(property===i){
return true
}
}
return false
}
let b=k.hasOwnPropertys("h")
console.log(b)
// result true
b=k.hasOwnPropertys("h8")
console.log(b)
when you have a question not related to the current topic please create a new thread
this time I will create the thread for you, next time please do it yourself.