summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-04-19 11:22:05 +0200
committerGitHub <noreply@github.com>2020-04-19 11:22:05 +0200
commit495b28765d03aa9459bc312ebba190ec208979e7 (patch)
tree1e4ff6e6b4eb09dea49dd60f356a71125f571eaa /doc/classes
parent039abbb64aef692495c09c03db25aa84f3375eb6 (diff)
parent4d41535fa3f660e35e8608db9e60948e6ddd906c (diff)
Merge pull request #38002 from madmiraal/fix-class_dictionary
Correct Dictionary addition of a key and the duplication of a variable name.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Dictionary.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 7bd01d6781..e982e00d6d 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -11,7 +11,7 @@
[codeblock]
var my_dir = {} # Creates an empty dictionary.
var points_dir = {"White": 50, "Yellow": 75, "Orange": 100}
- var my_dir = {
+ var another_dir = {
key1: value1,
key2: value2,
key3: value3,
@@ -34,7 +34,7 @@
To add a key to an existing dictionary, access it like an existing key and assign to it:
[codeblock]
var points_dir = {"White": 50, "Yellow": 75, "Orange": 100}
- var points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value.
+ points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value.
[/codeblock]
Finally, dictionaries can contain different types of keys and values in the same dictionary:
[codeblock]