JavaScript Arrays Crash Course

  Рет қаралды 93,134

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Arrays are one of the most fundamental building blocks of JavaScript. It doesn’t matter what project you build you need to understand how to use arrays. In this video I go over the absolute basics of arrays in JavaScript as well as a few other array based features so you can get up and running immediately with arrays.
📚 Materials/References:
JavaScript Array Methods Video: • 8 Must Know JavaScript...
🌎 Find Me Here:
My Blog: blog.webdevsimplified.com
My Courses: courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: github.com/WebDevSimplified
CodePen: codepen.io/WebDevSimplified
⏱️ Timestamps:
00:00 - Introduction
00:20 - Creating Arrays
02:17 - Get Elements
03:10 - Add Elements
03:40 - Nested Arrays
05:22 - Update Elements
#Arrays #WDS #JavaScript

Пікірлер: 140
@blueskies3336
@blueskies3336 10 ай бұрын
Where all my Odin Project peeps at man!?
@tostibrand1273
@tostibrand1273 7 ай бұрын
😂
@maxwatson8160
@maxwatson8160 7 ай бұрын
Present!
@jaysingh5051
@jaysingh5051 6 ай бұрын
Ayo😊
@juanmachaca5537
@juanmachaca5537 6 ай бұрын
Hi!
@EL_WAFI_CHERKAOUI
@EL_WAFI_CHERKAOUI 6 ай бұрын
HERE !
@L-8
@L-8 2 жыл бұрын
It's also worth noting that "array" is not one of JavaScript's "primitive" types; arrays are just objects, unlike strings, numbers, booleans, etc. If you test "typeof anArray", you get "object". Arrays are just objects with numbers as their keys, and some cool methods (and one property). If we "dissect" the array ["A", "B", "C", "D"], it's basically this object -- the keys 0 to 3 and length (the methods are hidden in its prototype): ( { 0: "A", 1: "B", 2: "C", 3: "D", length: 4 } )[2] // "C" The bracket notation you use to access array elements is also just an object thing - " person.name " can be written as " person["name"] ", for example. This bracket notation can be used instead of dot notation when you want to access an object property with a key that isn't a valid JavaScript identifer - in the case of arrays, a key starting with a number - or when you want to access a property on an object unknown until runtime.
@talleyrand9530
@talleyrand9530 2 жыл бұрын
Dude, nearly anything in JS is an object. It's true while a string for example is considered a primitive type, but you can access all of its methods inherited from the String.prototype as if it were an object try "str".length It has object properties so we deal with it as an object.
@L-8
@L-8 2 жыл бұрын
​@@talleyrand9530 But it's still not technically an object; it's just coerced to one behind the scenes when you read its properties. But your point that "nearly anything in JS is an object" should really be "everything" -- it's an object-oriented language after all. Object or not, though, the main point on primitives is that they can't be mutated.
@stanleybarbara6448
@stanleybarbara6448 Жыл бұрын
this is why i came, thanks for clarifying
@L-8
@L-8 Жыл бұрын
@@stanleybarbara6448 It wasn't the most beginner-friendly comment, admittedly, but you're welcome.
@Nsmp22
@Nsmp22 6 ай бұрын
This perfectly explains why arrays are considered objects. None of the courses I've read actually explained this, so thank you.
@The-Athenian
@The-Athenian 9 ай бұрын
Also, always use semicolons. He's not using any here because It's just an example and javascript understands code without them for the most part, but semicolons can help avoid mistakes.
@rishabsharma5307
@rishabsharma5307 2 жыл бұрын
some more crash couse ideas: 1. Typescript 2. Web 3.0/ blockchain 3. Your Hairstyle
@LexxGee1234
@LexxGee1234 Ай бұрын
Explain to me how these things are necessary
@godprozee
@godprozee 29 күн бұрын
@@LexxGee1234 Your sense of humor is really good
@LexxGee1234
@LexxGee1234 29 күн бұрын
@@godprozee thanks 👍
@talleyrand9530
@talleyrand9530 2 жыл бұрын
A simple tutorial at this point, but a welcome one. Thanks Kyle!
@paulward5452
@paulward5452 Жыл бұрын
Thanks!
@chickenjoy
@chickenjoy 2 жыл бұрын
I'm a new subscriber and I'm really loving these short but informational courses. Thank you for this Kyle.
@Hyper_Futbuss
@Hyper_Futbuss Жыл бұрын
Same
@Drelka
@Drelka 4 ай бұрын
Thanks for a quick reminder. Your videos are really helpful and explaination is very clear.
@reflectionethio9662
@reflectionethio9662 2 жыл бұрын
You really do simplify the web Thank you
@P00ters1
@P00ters1 2 жыл бұрын
perfect! i was just learning arrays!
@JonatanOliver
@JonatanOliver Жыл бұрын
Thank you for short but informational course
@adil8132
@adil8132 2 жыл бұрын
Thank you for your efforts! 👏
@CreativeTutorialsWeb
@CreativeTutorialsWeb 2 жыл бұрын
Thanks so much Kyle you're awesome
@modinateniola772
@modinateniola772 2 жыл бұрын
Thank you so much for this....it came at the right time
@lambertrichards
@lambertrichards Жыл бұрын
Thanks so much, awesome video!
@solartechv
@solartechv 2 ай бұрын
This is amazing!! thank you !
@CrazyCodingChannel
@CrazyCodingChannel 2 жыл бұрын
Thank you for your work!
@PhoticsTV
@PhoticsTV 2 жыл бұрын
Multidimensional arrays, impressive. Heh, it was nice to see one of these videos where I already understood everything, 😄
@hertechera
@hertechera 9 ай бұрын
Thank you for this
@marcinzale
@marcinzale 2 жыл бұрын
Well explained. Thank you!
@hiddenLadder
@hiddenLadder 2 жыл бұрын
np nigga
@manoj-k
@manoj-k 2 жыл бұрын
🔥🔥🔥 array methods next...
@Hyper_Futbuss
@Hyper_Futbuss Жыл бұрын
Great Arrays crash course thx from SriLanka
@AhmadMaartmesrini
@AhmadMaartmesrini Жыл бұрын
thanks Kyle!!!
@amirka25
@amirka25 2 жыл бұрын
Thank you for this interesting video. It looks like JS is very close to Google Sheets Scripts. Question, how much different are they? And if I learn one, how can I know the difference (in terms of commands)? Thanks again
@gamerZone93722
@gamerZone93722 7 ай бұрын
thanks my friend !
@rohithk5234
@rohithk5234 2 жыл бұрын
Accessing elements using a[index] can sometimes cause error, using a.at(index) is much better, suppose if u wanna access last element use a[a.length-1] or much more simpler way a.at(-1). Using built in methods is much easier. Love your videos.
@farhanaditya2647
@farhanaditya2647 2 жыл бұрын
Could you elaborate how exactly it can cause error? I've never encountered one. At most, it only gives a wrong element which is probably my own fault.
@farhanaditya2647
@farhanaditya2647 2 жыл бұрын
Anyway, I didn't know that .at(-1) will access the last element which is pretty handy. It's pretty annoying when you have to write a[element.length - 1] especially when the variable name is quite long. Thanks!
@farhanaditya2647
@farhanaditya2647 2 жыл бұрын
Actually, I just remembered that .at is a new feature so that explains why I never touch it before.
@paymankhayree8552
@paymankhayree8552 2 жыл бұрын
.at() is not supported by IE
@farhanaditya2647
@farhanaditya2647 2 жыл бұрын
@@paymankhayree8552 I think nobody cares about IE anymore.
@zl7289
@zl7289 2 жыл бұрын
That’s exactly what I need to learn recently
@bedribulut
@bedribulut 11 ай бұрын
thank you mate
@thehistoryof4677
@thehistoryof4677 2 жыл бұрын
Perfect timing
@hrf4711
@hrf4711 2 жыл бұрын
Please do a video on all loops example foreach, forin etc
@AnonymousCommentor_
@AnonymousCommentor_ Ай бұрын
Thanks man
@aliemrecakmakoglu9185
@aliemrecakmakoglu9185 2 жыл бұрын
Thank you for you video. It is amazing. However, I wondering another thing: Which app use to show your face on the right of the screen in a circle?
@L-8
@L-8 2 жыл бұрын
Any video editing software lol
@samehelgazar9443
@samehelgazar9443 2 жыл бұрын
ooh maaaan ,, iam studing arr since yesterday, and then u upload a video about it, what a coincidence lol ,, thanks for that but it would be better if its not a crash course
@UDOFAA
@UDOFAA 2 жыл бұрын
It really help
@codewithmarc3569
@codewithmarc3569 2 жыл бұрын
Good contents!
@kirantechnophile7852
@kirantechnophile7852 2 жыл бұрын
It's very clear. Arrays in 6mins.. can't believe it.
@chill_broskie
@chill_broskie 2 жыл бұрын
Kyle got so excited about array's he hit the mic
@samuelrovetto6405
@samuelrovetto6405 9 ай бұрын
how do you type [ ] on a Mac ?
@lucky_sherpa365
@lucky_sherpa365 21 күн бұрын
Kyle got a sick Jackson in the background bet he shreds
@PcHabitat
@PcHabitat 2 жыл бұрын
Hello sir, do you a js and dom cheat sheets by chance?
@chrisgk7494
@chrisgk7494 9 ай бұрын
I am surprised to not find a single Odin project comment
@EL_WAFI_CHERKAOUI
@EL_WAFI_CHERKAOUI 6 ай бұрын
there plenty of them
@iftakharhussain
@iftakharhussain 2 жыл бұрын
I really wish someone made a video on creating command palette on a website like vscode from scratch. I really hope You will make one.
@AlphaFrog1021
@AlphaFrog1021 2 жыл бұрын
that's not an easiest thing to do you know
@craiggazimbi
@craiggazimbi 2 жыл бұрын
Thanks mate , you making my JS journey smoooooooth.
@praisemark6971
@praisemark6971 7 ай бұрын
How is your first year as a software engineer. Just started any tips
@sattmowards
@sattmowards 2 күн бұрын
@@praisemark6971 Yep!
@asherstokes575
@asherstokes575 Жыл бұрын
Just perfect
@valentinestevens
@valentinestevens Жыл бұрын
and short
@modinateniola772
@modinateniola772 2 жыл бұрын
Pls share link of full video
@haibaidzokwomandre1468
@haibaidzokwomandre1468 9 ай бұрын
Hello to TOP students. we are together into this.
@richardlee2708
@richardlee2708 6 ай бұрын
I like this guy
@JustinK0
@JustinK0 2 жыл бұрын
What do you use to have it run live and update in the browser as you save the file?
@codingbeast6927
@codingbeast6927 2 жыл бұрын
It a live exstention server in visual studio code
@codingbeast6927
@codingbeast6927 2 жыл бұрын
@Obes Studios yes I think it is
@ContraHacker1337
@ContraHacker1337 2 жыл бұрын
Why did I watch this video all the way through? Monke see WDS video... monke click. Neuron activation.
@rahulsinha9766
@rahulsinha9766 2 жыл бұрын
Why I can't make any of my web pages even after learning html css and javascript
@rahulsinha9766
@rahulsinha9766 2 жыл бұрын
Whenever I try to write codes nothing comes in my mind
@chris94kennedy
@chris94kennedy 2 жыл бұрын
Try to recreate a website, start with appearance (html css) and then emulate functionality in JS
@mbuguaimmanuel672
@mbuguaimmanuel672 4 ай бұрын
how can you add a single item to an empty array each time without replacing those that are already in the array ....
@farshidjamali
@farshidjamali 2 жыл бұрын
Are the JS arrays the same as Python lists?
@L-8
@L-8 2 жыл бұрын
The equivalent, at least 🤷
@KaMZaTa
@KaMZaTa 2 жыл бұрын
@Web Dev Simplified @Kyle - Please please please! Make some tutorials about React and NodeJS SEO optimization! To me it's a really mess!
@romanpr6691
@romanpr6691 2 жыл бұрын
How do you refresh page without click on "reload" in browser?
@L-8
@L-8 2 жыл бұрын
It's a vscode extension called live server
@saidibrahim5931
@saidibrahim5931 2 жыл бұрын
Ctrl + r
@premsingh6967
@premsingh6967 2 жыл бұрын
nice
@Oxxygen_io
@Oxxygen_io 2 жыл бұрын
If you learn how arrays methods work you have learned a lot.
@diesunddas405
@diesunddas405 2 жыл бұрын
Will we ever see Kyle playing a metallica song on this guitar?
@amansaxena4827
@amansaxena4827 2 жыл бұрын
👍
@FairyFromTheMoon
@FairyFromTheMoon 2 жыл бұрын
I'm a js noob ... hence don't understand why there is no semicolon at the end of each line?
@EL_WAFI_CHERKAOUI
@EL_WAFI_CHERKAOUI 6 ай бұрын
because its not a separated block of code
@FairyFromTheMoon
@FairyFromTheMoon 6 ай бұрын
@@EL_WAFI_CHERKAOUI tnx 🙏
@safwanu2be
@safwanu2be 2 жыл бұрын
Hi bro Nice videos മലയാളി ಕನ್ನಡಿಗಾಸ್
@jehadnasereddin7755
@jehadnasereddin7755 2 жыл бұрын
2:00 **laughs in Matlab**
@luke43credici73
@luke43credici73 7 ай бұрын
Ngl at first i got a bit confused at the end of the video
@fernandobarros1911
@fernandobarros1911 2 жыл бұрын
No legends? :(
@daljeetsingh5127
@daljeetsingh5127 2 жыл бұрын
@chris94kennedy
@chris94kennedy 2 жыл бұрын
Hi Kyle - please would you consider doing Python videos? Thank you for your content.
@Gaius_Julius_Caesar_Augustus
@Gaius_Julius_Caesar_Augustus 2 жыл бұрын
First
@vishnuvirat2501
@vishnuvirat2501 2 жыл бұрын
Expecting Full react course and Javascript course for free❤️❤️❤️
@Binyamin1444
@Binyamin1444 2 жыл бұрын
No, They're worth paying for. I bought both his JS courses and about to buy his React course.
@vishnuvirat2501
@vishnuvirat2501 2 жыл бұрын
@@Binyamin1444 I am from India. When we convert to dollers to rupees, it costs heavy.
@atikur129
@atikur129 2 жыл бұрын
Second
@hiddenLadder
@hiddenLadder 2 жыл бұрын
is that all?? lol
@L-8
@L-8 2 жыл бұрын
Nope 😃 There's a whole rabbit hole of array methods.
@hiddenLadder
@hiddenLadder 2 жыл бұрын
@@L-8 yeah i know that i just thought that i could learn something new for myself
@enes471
@enes471 2 жыл бұрын
I like your nose
@ReyBanYAHUAH
@ReyBanYAHUAH 2 жыл бұрын
Always remember we must repent of our sins (sin is transgression The Law Of Yahuah The Father in Heaven. The Law are The Books: Genesis, Exodus, Leviticus, Numbers, & Deuteronomy). We must repent of our sins and Have Belief On Yahusha The Messiah. HE Died and Rose three days later so that we can be forgiven of our sins! Come to HIM🙂🙂🙂🙂🙂🙂🙂
@jesuschristsaves1955
@jesuschristsaves1955 2 жыл бұрын
And saying, The time is fulfilled, and the kingdom of God is at hand: repent ye, and believe the gospel. - Mark 1:15 KJV The Gospel aka the Good News Moreover, brethren, I declare unto you the gospel which I preached unto you, which also ye have received, and wherein ye stand; 2 By which also ye are saved, if ye keep in memory what I preached unto you, unless ye have believed in vain. 3 For I delivered unto you first of all that which I also received, how that Christ died for our sins according to the scriptures; 4 And that he was buried, and that he rose again the third day according to the scriptures: - 1 Corinthians 15: 1-4 KJV For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. - John 3:16 KJV That if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved. 10 For with the heart man believeth unto righteousness; and with the mouth confession is made unto salvation. 11 For the scripture saith, Whosoever believeth on him shall not be ashamed. - Romans 10:9-11 KJV For whosoever shall call upon the name of the Lord shall be saved. - Romans 10:13 KJV Jesus saith unto him, I am the way, the truth, and the life: no man cometh unto the Father, but by me. - John 14:6 KJV He that believeth on the Son hath everlasting life: and he that believeth not the Son shall not see life; but the wrath of God abideth on him. - John 3:36 KJV
@Gaius_Julius_Caesar_Augustus
@Gaius_Julius_Caesar_Augustus 2 жыл бұрын
Second
@aapohanhisalo5137
@aapohanhisalo5137 2 жыл бұрын
First
Watch This If You Don’t Understand Type Coercion
8:19
Web Dev Simplified
Рет қаралды 128 М.
Learn JavaScript Array Reduce In 10 Minutes
10:22
Web Dev Simplified
Рет қаралды 194 М.
когда одна дома // EVA mash
00:51
EVA mash
Рет қаралды 11 МЛН
ШЕЛБИЛАР | bayGUYS
24:45
bayGUYS
Рет қаралды 606 М.
8 Must Know JavaScript Array Methods
10:05
Web Dev Simplified
Рет қаралды 1 МЛН
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,1 МЛН
10 Tailwind Classes I Wish I Knew Earlier
13:31
Web Dev Simplified
Рет қаралды 151 М.
Why Is Array/Object Destructuring So Useful And How To Use It
13:24
Web Dev Simplified
Рет қаралды 417 М.
Arrays in Javascript | Arrays Tutorial for Beginners
28:47
Dave Gray
Рет қаралды 11 М.
How To Actually Get Hired In 2024
10:43
Web Dev Simplified
Рет қаралды 186 М.
JavaScript Array Mastery: Tips, Tricks & Best Practices
1:02:49
Envato Tuts+
Рет қаралды 15 М.
Every JavaScript Developer Has Made This Mistake With Functions
7:17
Web Dev Simplified
Рет қаралды 103 М.