0

I'm prepping for my coding interviews using LeetCode and JavaScript. In video solutions people are referring to using the JavaScript object {} as using a Hashmap or Hashtable. Would it be wrong if I called it an object during the interview?

westie
  • 3
  • 2
  • 1
    That's what most people here call it. It's implemented as a hash table, but no one calls it that. – Barmar Mar 30 '22 at 21:36
  • 1
    I would either call it object or [object literal](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#object_literals), depending on the context. – jabaa Mar 30 '22 at 21:37
  • You may call it dictionary, like [here](https://stackoverflow.com/questions/3559070/are-there-dictionaries-in-javascript-like-python) – n-- Mar 30 '22 at 21:39
  • How about casually referring to a JS `Object` instance as _"Bag of key value pairs"_? ... btw `{}` in its written form is called an object literal, and it does _materialize_ as an empty object (thus it features not a single own property). – Peter Seliger Mar 30 '22 at 22:42

1 Answers1

0

The correct terminology in JavaScript is Object Docs

Ross
  • 396
  • 2
  • 7