Communities for your favorite technologies. Explore all Collectives
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I am considering using JavaScript object as a dictionary.
var dict = {} dict['a'] = 1; dict['b'] = 2; var my_first = dict['a'];
I am not clear about the time-complexity of such implementation. Is it like hashing? Thank you.
JavaScript objects are often called "hashes" (mostly by recovering Perl addicts) or "hash tables" (unrepentant Java people). The typical look-up is somewhere between O(1) and O(log n).
Add a comment
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.