How is the length of an object calculated?
console.log({0:"a",1:"b"}.length)//returns undefined but object has the length property
Object.hasOwnProperty("length") // true
But how can hasOwnProperty() work?Object dont have this method ,the method is in its prototype