I am trying to implement simple hash map with key - value pair similar to java in javascript. I want to map index and corresponding page number, index as key and pagenumber as value.
for example --> index - 1 , pagenumber-10
How to implement this in java script?
a = {},a['index']=1,a['pagenumber']=10. The example is just one way you can do this. There are at least 2 other ways to declare JS Object and assign attribute to it.