Arrays in Javascript | Arrays Tutorial for Beginners

preview_player
Показать описание

An Introduction to Arrays in JavaScript that shows examples of how to create new arrays, modify array elements, and delete array elements as well as exploring examples of array methods and multidimensional arrays.

✅ Quick Concepts outline:
Arrays in Javascript
(00:00) Intro
(0:14) Arrays are Data Structures
(0:20) How to create an array
(1:00) How to add elements to an array
(2:00) Reference an array and view it in the console
(2:35) Length property of an array
(2:55) Reference the last element in an array
(3:55) Reference any item in an array by position
(4:20) Using the push() method to add elements to an array
(5:00) Using the pop() method to remove elements from an array
(6:00) Using the unshift() method to add elements to an array
(7:15) Using the shift() method to remove elements from an array
(8:15) Do the element positions change in the array?
(9:15) Referencing an element that does not exist
(9:35) How to remove an element from the middle of an array
(9:50) What happens when you delete an element from an array
(10:55) Using the splice() method to remove, replace, and insert elements
(13:45) The slice() method
(15:00) The reverse() method
(15:30) The join() method
(16:15) The split() method is a string method that creates a new array
(18:00) The concat() method
(18:55) Using the spread operator to combine arrays
(20:55) Multidimensional arrays / Nested arrays: Sports Store example
(21:45) Referencing an element in a single dimension array
(22:50) Referencing an element in a two dimensional array
(25:25) Referencing an element in a three dimensional array

📚 Further Reading:
MDN Web Docs:
Eloquent JavaScript Chapter 4:

📺 More Beginner JS Videos:

✅ Follow Me:

#arrays #javascript #tutorial
Рекомендации по теме
Комментарии
Автор

Wow, this 3-year-old tutorial is so great! Arrays is one of the concepts *I always struggle to understand.* But, this video has helped me learn lots of new concepts about Arrays. Thank you so much Dave, you're an excellent teacher!

iamtharunraj
Автор

You have a gift for explaining and teaching.
Great once more.

CondeAlberto
Автор

I used google to figure out how to configure Visual Studio Code with the console output just like your video. Then I followed along and paused to experiment further. Very helpful! This is my favorite way to learn how to code. Thanks!

greatoutdoors
Автор

Amazing practical explanation! Thank you!
I remember Linear Algebra course at my university - it was a nightmare because of the instructor, and eventually I just hated everything related to arrays and stuff.
I wish all the instructors have at least part of that gift for explaining and teaching that you have.

Grihlo
Автор

This is the best explanation of multi-dimensional arrays I have ever seen.
You are a really really good teacher Mr. Gray ❤

nikolov
Автор

Loved this lecture! Just Finished it and Understood everything Thankyou so much DAVE <3

Awpsun
Автор

Here's the code for anyone that doesn't want to type it out:

const equipShelfA = ["baseball", "football", "volleyball"];
const equipShelfB = ["basketball", "golf balls", "tennis balls"];

const clothesShelfA = ["tank tops", "t-shirts", "jerseys"];
const clothesShelfB = ["sweat tops", "sweat pants", "hoodies"];

const equipDept = [equipShelfA, equipShelfB];
const clothesDept = [clothesShelfA, clothesShelfB];

const sportsStore = [equipDept, clothesDept];

djheckler
Автор

Informative and entertaining as always. When I come to this channel I understand that studying can really be a fun and exciting thing to do! Thank you, Dave!

konstantinzakharov
Автор

do you have an app cause i would like to see it

patrickonoigboria
Автор

Thank you for very interesting lessons

jamshidtashkent
Автор

thank you so much dave :) .
would be really nice if you put in notes below the video . #Grateful

amankumarsingh
Автор

hi you are good but i can't quite see it clearly

patrickonoigboria
Автор

why do you always uses const in most of your videos.

onlinestudies-jm
Автор

I can already tell arrays are gonna be a pain in the ass😭

yeahoahpy