Arrays in Javascript | Arrays Tutorial for Beginners

  Рет қаралды 11,407

Dave Gray

Dave Gray

Күн бұрын

Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
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.
▶ This video is part of the JavaScript Tutorials for Beginners Playlist found here: • Javascript Tutorials f...
✅ 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:
Arrays: developer.mozilla.org/en-US/d...
Eloquent JavaScript Chapter 4:
eloquentjavascript.net/04_dat...
📺 More Beginner JS Videos:
freeCodeCamp: • Learn JavaScript - Ful...
Traversy Media: • JavaScript Crash Cours...
The Net Ninja: • Modern JavaScript Tuto...
✅ Follow Me:
Twitter: / yesdavidgray
Reddit: / daveoneleven
Medium: / davegray_86804
#arrays #javascript #tutorial

Пікірлер: 18
@iamtharunraj
@iamtharunraj 16 күн бұрын
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!
@CondeAlberto
@CondeAlberto 2 жыл бұрын
You have a gift for explaining and teaching. Great once more.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you for the kind words, Alberto! 🙏🙏
@9nikolov
@9nikolov 2 ай бұрын
This is the best explanation of multi-dimensional arrays I have ever seen. You are a really really good teacher Mr. Gray ❤
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 ай бұрын
Thank you!
@greatoutdoors6318
@greatoutdoors6318 2 жыл бұрын
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!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're welcome! 🙏
@Grihlo
@Grihlo Жыл бұрын
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.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it was helpful and thank you for the kind words, Grigory! 🙏💯
@konstantinzakharov5643
@konstantinzakharov5643 7 ай бұрын
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!
@djheckler92
@djheckler92 2 жыл бұрын
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];
@jamshidtashkent1976
@jamshidtashkent1976 Жыл бұрын
Thank you for very interesting lessons
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@amankumarsingh7311
@amankumarsingh7311 Жыл бұрын
thank you so much dave :) . would be really nice if you put in notes below the video . #Grateful
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@user-rc9ti8cz3s
@user-rc9ti8cz3s 6 ай бұрын
why do you always uses const in most of your videos.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 6 ай бұрын
You should whenever possible. I could write an article or create a video on the reasons. Here's a brief StackOverflow explanation: stackoverflow.com/questions/41086633/in-javascript-why-should-i-usually-prefer-const-to-let
@yeahoahpy705
@yeahoahpy705 Ай бұрын
I can already tell arrays are gonna be a pain in the ass😭
Refactoring Code | Rock Paper Scissors | Web Dev | Javascript
18:37
ШЕЛБИЛАР | bayGUYS
24:45
bayGUYS
Рет қаралды 712 М.
Тяжелые будни жены
00:46
К-Media
Рет қаралды 5 МЛН
Trágico final :(
01:00
Juan De Dios Pantoja
Рет қаралды 32 МЛН
Javascript Objects Explained | Javascript Objects Tutorial
23:17
JavaScript Array Mastery: Tips, Tricks & Best Practices
1:02:49
Envato Tuts+
Рет қаралды 16 М.
JSON Explained with JavaScript | JSON Tutorial for Beginners
7:12
Functions in Javascript | Javascript Functions Tutorial
12:18
Event Listeners in JavaScript | JavaScript Events Tutorial
39:32
8 Must Know JavaScript Array Methods
10:05
Web Dev Simplified
Рет қаралды 1 МЛН
Python lists, sets, and tuples explained 🍍
15:06
Bro Code
Рет қаралды 220 М.
Обманет ли МЕНЯ компьютерный мастер?
20:48
Харчевников
Рет қаралды 184 М.
What’s your charging level??
0:14
Татьяна Дука
Рет қаралды 6 МЛН
😱НОУТБУК СОСЕДКИ😱
0:30
OMG DEN
Рет қаралды 2,1 МЛН
Готовый миниПК от Intel (но от китайцев)
36:25
Ремонтяш
Рет қаралды 450 М.