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?
you can use javascript objects, where you can have key – value parametres,
e.g, : x = { index : 1, pagenumber : 10 }
you can have objects inside the objects, for example :
and you can access this like below :