mirror of
https://github.com/godotengine/godot.git
synced 2025-02-16 07:40:36 +00:00
Updated tutorial_gdscript_efficiently (markdown)
parent
8d5961f958
commit
66d179daee
@ -248,15 +248,15 @@ var d = {
|
||||
}
|
||||
|
||||
print("Name: ", d.name, " Age: ", d.age ) # used "." based indexing
|
||||
d.name="caroline" #works for assignment
|
||||
|
||||
# indexing
|
||||
|
||||
d.nother="rebecca" #this doesn't work (use syntax below to add a key:value pair)
|
||||
d["mother"]="rebecca" #this works
|
||||
|
||||
d.name="caroline" # if key exists, assignment does work, this is why it's like a quick struct.
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user