removed ungrammatical apostrophe (#35353)
Changed "array's" to "arrays".
This commit is contained in:
committed by
Randell Dawson
parent
dd9ce2bc2a
commit
7d9ef880c2
@ -8,7 +8,7 @@ challengeType: 1
|
||||
<section id='description'>
|
||||
The below is an example of the simplest implementation of an array data structure. This is known as a <dfn>one-dimensional array</dfn>, meaning it only has one level, or that it does not have any other arrays nested within it. Notice it contains <dfn>booleans</dfn>, <dfn>strings</dfn>, and <dfn>numbers</dfn>, among other valid JavaScript data types:
|
||||
<blockquote>let simpleArray = ['one', 2, 'three’, true, false, undefined, null];<br>console.log(simpleArray.length);<br>// logs 7</blockquote>
|
||||
All array's have a length property, which as shown above, can be very easily accessed with the syntax <code>Array.length</code>.
|
||||
All arrays have a length property, which as shown above, can be very easily accessed with the syntax <code>Array.length</code>.
|
||||
A more complex implementation of an array can be seen below. This is known as a <dfn>multi-dimensional array</dfn>, or an array that contains other arrays. Notice that this array also contains JavaScript <dfn>objects</dfn>, which we will examine very closely in our next section, but for now, all you need to know is that arrays are also capable of storing complex objects.
|
||||
<blockquote>let complexArray = [<br> [<br> {<br> one: 1,<br> two: 2<br> },<br> {<br> three: 3,<br> four: 4<br> }<br> ],<br> [<br> {<br> a: "a",<br> b: "b"<br> },<br> {<br> c: "c",<br> d: “d”<br> }<br> ]<br>];</blockquote>
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user