2018-10-12 15:37:13 -04:00
|
|
|
---
|
|
|
|
title: Access an Array's Contents Using Bracket Notation
|
|
|
|
---
|
2019-07-24 00:59:27 -07:00
|
|
|
# Access an Array's Contents Using Bracket Notation
|
2018-10-12 15:37:13 -04:00
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
|
|
|
|
---
|
|
|
|
## Hints
|
|
|
|
|
|
|
|
### Hint 1
|
2018-10-12 15:37:13 -04:00
|
|
|
- Remember the arrays index begins at 0 so the postion of b will be located in `myArray[1]`.
|
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
|
|
|
|
---
|
|
|
|
## Solutions
|
|
|
|
|
|
|
|
<details><summary>Solution 1 (Click to Show/Hide)</summary>
|
2018-10-12 15:37:13 -04:00
|
|
|
```javascript
|
|
|
|
myArray[1] = "anything we want";
|
|
|
|
```
|
2019-07-24 00:59:27 -07:00
|
|
|
</details>
|