Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,155,607 members, 7,827,291 topics. Date: Tuesday, 14 May 2024 at 10:09 AM |
Nairaland Forum / Science/Technology / Programming / What's The Difference Between Hashmap And Objects (545 Views)
What Are Proxy Objects? And How They Work In Javascript / Difference Between Website Design, Front End And Back End Development / The Existence Of Compound Objects (2) (3) (4)
What's The Difference Between Hashmap And Objects by Tobedated(m): 10:43pm On Nov 09, 2022 |
Currently going through Grokking algorithms and it defines hashmap as key/value pairs but isn't that the same as object are they the same thing or what's the difference between the two |
Re: What's The Difference Between Hashmap And Objects by chukwuebuka65(m): 11:05pm On Nov 09, 2022 |
Tobedated: Just see objects as a group of variables that are related together with methods to work on them. That’s the foundation of object oriented programming . Hash maps are just like array but with named indexes. I think javascript objects acts like hash maps and also like objects ( in the real sense of objects ie a group of related variables and functions to manipulate them). You can google objects in programming in general to understand more. |
Re: What's The Difference Between Hashmap And Objects by TastyFriedPussy: 6:56am On Nov 10, 2022 |
You'll later give up and I'll be here waiting for you when that eventually happens rubbish.. 1 Like |
Re: What's The Difference Between Hashmap And Objects by etoluw: 7:15am On Nov 10, 2022 |
Tobedated: In OOP objects are not key/value pairs . It is JavaScript that give you that impression. Any key/value pair is a Map. we have different types of Map TreeMap HashMap LinkedHashMap 2 Likes |
Re: What's The Difference Between Hashmap And Objects by Tobedated(m): 9:42am On Nov 10, 2022 |
chukwuebuka65:thanks that means i still got a lot to learn |
Re: What's The Difference Between Hashmap And Objects by Tobedated(m): 9:44am On Nov 10, 2022 |
etoluw:oh, okay thanks i still got a lot to learn |
Re: What's The Difference Between Hashmap And Objects by Deicide: 4:52pm On Nov 10, 2022 |
Well in a HashMap your keys are unique. Except maybe you using a multimap data structure. This is one of the reason we ask people to start with Languages like C++ or Java, this is because this are Strongly and statically typed languages. 4 Likes 2 Shares |
Re: What's The Difference Between Hashmap And Objects by tosinhtml: 7:23pm On Nov 10, 2022 |
TastyFriedPussy: You need deliverance! |
Re: What's The Difference Between Hashmap And Objects by tensazangetsu20(m): 7:52pm On Nov 10, 2022 |
Deicide: You can't have double key types in a JavaScript object still. |
Re: What's The Difference Between Hashmap And Objects by Karleb(m): 8:11pm On Nov 10, 2022 |
tensazangetsu20: It's good to note that javascript has a map object, which works very similar to the hashmaps in Java for example. |
Re: What's The Difference Between Hashmap And Objects by tensazangetsu20(m): 8:12pm On Nov 10, 2022 |
Karleb:Yeah ES6. Map and Sets |
Re: What's The Difference Between Hashmap And Objects by 99thEnemy(m): 9:31pm On Nov 10, 2022 |
TastyFriedPussy: |
Re: What's The Difference Between Hashmap And Objects by Deicide: 9:52pm On Nov 10, 2022 |
tensazangetsu20:It would complain but allow it |
Re: What's The Difference Between Hashmap And Objects by tensazangetsu20(m): 9:58pm On Nov 10, 2022 |
Deicide: It won't. It reassigns what you had on the previous key to the present. |
Re: What's The Difference Between Hashmap And Objects by Deicide: 10:52pm On Nov 10, 2022 |
tensazangetsu20:Hmm but that is not a good Idea it leaves room for error. |
(1) (Reply)
Buy Likes And Followers For Social Media Platforms, Some Best Information / Between This 2 Programmes. / Three Ways To Show Hidden Folders In Windows
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 16 |