GeezerVison is showing github.com — Small edits · reprogram2098/JavaScript-Lessons@57d250e
File tree
Expand file treeCollapse file tree
Open diff view settings
Data_Structures/Dictionaries
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: Data_Structures/Dictionaries/README.md +2-2Lines changed: 2 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -25,9 +25,9 @@ In an dictionary we can do 4 basic actions, (please notice that as we did in our |
25 | 25 | });* |
26 | 26 | - **Reassign**: Sometimes we wish to change the value to some key in this case we use this syntax: |
27 | 27 | *dict.keyname1 = "valuename1";* |
28 | | -- Remove or delete: The best way to remove a property from a dictionary is to use the *delete* keyword: |
| 28 | +- **Remove or delete:** The best way to remove a property from a dictionary is to use the *delete* keyword: |
29 | 29 | *delete dict["keyname"];* |
30 | | -- Lookup: Thats is just an elaborate way to say that we wish to check, (to get actually), a value that is associated to a specific key. for example here we wish to prin the value of the key "keyname1" from the dictionary "dict": |
| 30 | +- **Lookup:** Thats is just an elaborate way to say that we wish to check, (to get actually), a value that is associated to a specific key. for example here we wish to prin the value of the key "keyname1" from the dictionary "dict": |
31 | 31 | *console.log(dict['keyname1']);* |
32 | 32 |
|
33 | 33 | Sometimes instead of add or reassign there is a single set operation that adds a new (key,value) pair if one does not already exist, and otherwise reassigns it. |