Skip to content

Commit 8cf3970

Browse files
Update map.md
1 parent 975ac47 commit 8cf3970

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

docs/map.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
## Map
22
A map is similar to an array, but uses an object, or dictionary/map to store items of different data types, like numbers and strings.
33
Objects use key-value pairs, allowing values of any time, which provides the flexibility needed for data.
4+
Additionally, the key must be either a number or string, while the value type can be any type.
5+
``` ts
6+
const myMap = {[index: string]: number}
7+
```

0 commit comments

Comments
 (0)