I am developing a mobile app using JQuery Mobile. Wanted to know whether can i create a HashMap the way we can do it in JAVA, in JQuery Mobile?
If yes, then how? please if possible provide me some example.
In plain Javascript it is possible to create something very similar to a java HashMap:
var hashmap = {};
Put something in it:
hashmap['key'] = 'value';
Get something out of it:
var value = hashmap['key'];
For most purposes this will do, but it is not exactly the same as a hashmap, see for example this question: JavaScript Hashmap Equivalent
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With