Created
August 10, 2023 18:04
-
-
Save Deshan555/f257d1f12c5170a830d8c9824fc106ef to your computer and use it in GitHub Desktop.
Hashmap implementation of Javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var hashmap = new Map( | |
| [ | |
| ["aa1689", "deshan jayashanka"], | |
| ["aa5678", "rashmi wijayawardana"], | |
| ["aa1234", "laksisis gunarathna"], | |
| ["aa1345", "amandi kavindya"], | |
| ]); | |
| console.log(hashmap); | |
| console.log(hashmap.get("aa1689")); | |
| console.log(hashmap.has("aa1689")); | |
| console.log(hashmap.delete("aa1689")); | |
| hashmap.set("aa1089", "deshan jayashanka"); | |
| console.log(hashmap); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment