Created
June 20, 2023 09:59
-
-
Save alexsoyes/77c1c42a92aed80ad74f237be48ef0d6 to your computer and use it in GitHub Desktop.
Exemple TypeScript : Hashmap
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
const hashmap: { [key: string]: number } = {}; | |
hashmap["key1"] = 1; | |
hashmap["key2"] = 2; | |
hashmap["key3"] = 3; | |
console.log(hashmap["key2"]); // Output: 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment