From the course: Learn JavaScript: Write Modern Code with JavaScript ESNext
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Learn about arrays in JavaScript - JavaScript Tutorial
From the course: Learn JavaScript: Write Modern Code with JavaScript ESNext
Learn about arrays in JavaScript
- Now that we've seen how objects work, it's time to take a look at arrays in JavaScript. Now, if you're coming to JavaScript from another language, the language you're coming from probably had a very similar construct, although it may have been called something else, such as a list, or a collection. In JavaScript, arrays are ordered collections of values, usually defined using square brackets like this. The values in an array can be any of the basic data types, and the values that any individual array contains don't all have to be the same data type as some other statically typed languages require. Now, before we go any further, you may have noticed that arrays aren't listed as one of the basic data types in JavaScript, and that's because in JavaScript, arrays aren't technically their own data type, they're actually considered objects, as we can see if we use the type of operator on our array, which looks like this. Now, in the vast majority of situations, this is really more of just…
Contents
-
-
-
-
(Locked)
Learning objectives1m 14s
-
(Locked)
Learn the types3m 20s
-
(Locked)
Learn about JavaScript’s Number type5m 14s
-
(Locked)
Learn about JavaScript’s String type5m 14s
-
(Locked)
Learn about JavaScript’s Boolean type2m 4s
-
Learn about JavaScript’s Object type6m 9s
-
(Locked)
Learn about arrays in JavaScript3m 7s
-
(Locked)
Learn about JavaScript’s function type2m 20s
-
(Locked)
Learn about JavaScript’s undefined type2m 27s
-
(Locked)
Learn about JavaScript’s BigInt type2m 47s
-
(Locked)
Learn about JavaScript’s Symbol type3m 17s
-
(Locked)
-
-
-
-
-
-
-
-
-
-