I know a lot of ways to create JS objects but I didn\'t know the Object.create(null)
\'s one.
Question:
is it exactly the same as:
When you create an Object with Object.create(null) that means you are creating an Object with no prototype.null here means end of prototype chain. Nevertheless when you create an object like {} Object prototype will be added. Hence these are two different objects, one with prototype another without prototype.Hope this helps