fix: performed first conversions
This commit is contained in:
parent
1a6392f0f0
commit
5cf039e5fd
@ -9,7 +9,7 @@ challengeType: 1
|
||||
The fundamental feature of any data structure is, of course, the ability to not only store data, but to be able to retrieve that data on command. So, now that we've learned how to create an array, let's begin to think about how we can access that array's information.
|
||||
When we define a simple array as seen below, there are 3 items in it:
|
||||
|
||||
```
|
||||
```js
|
||||
let ourArray = ["a", "b", "c"];
|
||||
```
|
||||
|
||||
@ -17,7 +17,7 @@ In an array, each array item has an <dfn>index</dfn>. This index doubles as the
|
||||
In order to retrieve an element from an array we can enclose an index in brackets and append it to the end of an array, or more commonly, to a variable which references an array object. This is known as <dfn>bracket notation</dfn>.
|
||||
For example, if we want to retrieve the <code>"a"</code> from <code>ourArray</code> and assign it to a variable, we can do so with the following code:
|
||||
|
||||
```
|
||||
```js
|
||||
let ourVariable = ourArray[0];
|
||||
// ourVariable equals "a"
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user