2

The question might seem like one already asked before. But I assure you it hasn't been asked before. I want to know how a javascript object stores keys inside it internally. Does it create any hash/map or anything else?

My best guess would be a hash. But I'm not so sure about it and I couldn't find any article/webpage which could back up my thoughts on this.

Also, when we fetch a key from an object, does the object iterates over all the keys previous to the one we're trying to fetch or it just fetches the value associated with the target key as is done in c++ or any other language in constant time.

If you could refer me to an article, that would also be very helpful.

Kartik Chauhan
  • 2,779
  • 5
  • 28
  • 39

0 Answers0