Это видео недоступно.
Сожалеем об этом.
Arrays in Javascript | Arrays Tutorial for Beginners
HTML-код
- Опубликовано: 12 авг 2024
- 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
You have a gift for explaining and teaching.
Great once more.
Thank you for the kind words, Alberto! 🙏🙏
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!
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!
Loved this lecture! Just Finished it and Understood everything Thankyou so much DAVE
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!
You're welcome! 🙏
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.
Glad it was helpful and thank you for the kind words, Grigory! 🙏💯
This is the best explanation of multi-dimensional arrays I have ever seen.
You are a really really good teacher Mr. Gray ❤
Thank you!
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];
Thank you for very interesting lessons
You're welcome!
thank you so much dave :) .
would be really nice if you put in notes below the video . #Grateful
You're welcome!
why do you always uses const in most of your videos.
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
I can already tell arrays are gonna be a pain in the ass😭