Fix typo
This commit is contained in:
parent
f57be1bbb3
commit
ffeca57450
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ let obj = {
|
|||
0: "test" // same as "0": "test"
|
||||
}
|
||||
|
||||
// bot alerts access the same property (the number 0 is converted to string "0")
|
||||
// both alerts access the same property (the number 0 is converted to string "0")
|
||||
alert( obj["0"] ); // test
|
||||
alert( obj[0] ); // test (same property)
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue