The enthusiasm you have for coding is inspiring. I'm here from The Odin Project, and I keep referring back to these videos like a textbook. You're doing some really valuable work here!
Hello fellow Odinite!! TOP sent me here too. Since your comment is 1 year old I'm quite curious about the stage you must've reached today. Did you finish the entire course? If yes, did you land a job of some sort? was it a good trip so far?
I appreciate this as well. The only thing is I prefer writing it out more as I think it is so much more readable. I wonder what the standard would be at most companies and if that would be looked down upon.
Refreshing to see more Odin comments, they were really fizzling out in the last few links. Remember y'all, this is the last of the lessons for the first part, if you survived this far you 100% got this :)
I come from Odin bro! Thanks for saying "that if you survived this far you 100% got this." Array methods seems difficult to understand but I hope in time I will understand it.
I'm currently a ball of stress prepping for a bootcamp interview and I just wanna say that WOAH...WOAAAAAHHH gave me my first laugh in literal days. Thank you, I needed that lmao
Great video! However for new programmers: at 2:30, I think someone being a "hot shot" isn't necessarily a good thing. It's important to write code such that it is "self-documenting". By getting rid of the "currentYear" variable, it makes it less clear what you're actually getting from that "new Date()" constructor. The arrow function prior to that is probably the best iteration of this function just because it declutters. However, an "if" block is also totally acceptable if you feel that is more readable.
I think the `.filter()` approach is an equally preferable approach for the last item. It's kind of a missed opportunity too, to discuss the other parameters of the callback functions for `.map()`, `.filter()`, and `.reduce()` I initially went with `delete comments[idx]` approach which, while it mutates the original array, does not update its length, and Google searches points me to using `.splice()` instead (as you have done here)
Just had a small query, is there any major disadvantages of using let instead of const - i.e. declaring variables instead of constants? I have so far seen most tutorials (if not all) have a preference for constants. But due to my very limited experience in coding & (bad) habits, I find myself using variables so that I can reuse the same without having to reinvent a new constant name. What I wanted to say is, say in a function I need to use 5 DOM objects at five different times (will never be reused once done with it) - I find it much easier to use a single variable and keep assigning it with a new object as and when needed. Any help in this direction will be much appreciated. Don't want to develop a bad habit early on :-) .
What is the most sound way to get a table of people's name and year for individuals who are over the age of 19? Is there a way to use .every() method to get this table?
I really like how nimble you are with your lines of code. how did you manage to move a line of code from on line to another? I'm referring to the edit made @1:46
Late to the party! These are really awesome, Wes! Actually commenting for Array Cardio 1, #6. I've typed in your sample code as is but I can't seem to get past an error: null is not an object for category.querySelectorAll.
Hey, thanks for all the good work, it's nice to have someone introduce new ES6 features in such a practical fashion :). Q: Is there a reason not to use .splice(), and do the expansion method? The code ends up looking more verbose and less readable...
If you want to keep the original array intact, but prefer using the splice() method, you can simply do the following: const newComments = [...comments]; newComments.splice(index, 1); This ensures that the changes are immutable and is a bit easier to read in my opinion. PS. Just in case you were wondering, you cannot simply do the splice on the same line (eg. const newComments = [...comments].splice(index, 1);) because splice() will actually return the "removed" item(s) as a new array.
Hi Team, Can someone kindly explain why I cant just have this slice in my code instead: ...comments.slice(0, 2), It works exactly the same. Is there a reason you have put in the second slice rule? "...comments.slice(index + 1)"
Did you try his solution for exercise 6 in the console? You can look at my comment on day 1 video for reference. I had to declare another variable to make it work.
6 ปีที่แล้ว
Array.prototype methods are nice, but I prefer to use for and while loops, because I'm old and used to these. Besides, the performance of Array.prototype methods is atrocious on large data sets, across all browsers, while loops perform quite well.
In this video there is two slice, not two splice. The first slice is creating array of elements before the element that we want to delete , and the second slice is doing the same with elements that go after the element we want to delete. And those two arrays are spread inside newComments array.
i like this but iwi sh there more emphasis on teaching. i feel like he's just speeding through solving the problems instead. For someone that just needs a refresher this may be great but for someone that is learning the concepts its a bit hard to follow.
Honestly dude, great content but you go way too quickly in all your videos and it really diminishes the experience. I get it, we can pause and what not but if it's still too fast 0.75 speed, then you're going to fast.
The enthusiasm you have for coding is inspiring.
I'm here from The Odin Project, and I keep referring back to these videos like a textbook. You're doing some really valuable work here!
Hello fellow Odinite!! TOP sent me here too.
Since your comment is 1 year old I'm quite curious about the stage you must've reached today.
Did you finish the entire course? If yes, did you land a job of some sort?
was it a good trip so far?
@@adamnasra3898 how are you doing,did you go react or ruby on rail
I appreciate how you show the different ways to format a code from most basic to then write it again in a more advanced/more compressed format.
I appreciate this as well. The only thing is I prefer writing it out more as I think it is so much more readable. I wonder what the standard would be at most companies and if that would be looked down upon.
Refreshing to see more Odin comments, they were really fizzling out in the last few links. Remember y'all, this is the last of the lessons for the first part, if you survived this far you 100% got this :)
I come from Odin bro!
Thanks for saying "that if you survived this far you 100% got this."
Array methods seems difficult to understand but I hope in time I will understand it.
@@albertt755 fr
TOP brought me here, thank you so much for these exercises. You don't waste time and you give great explanations on your projects!
So, where did you end up?, I've been trying to learn to code since november but still don't have enough confidence or knowledge to land on a dev job.
Me too!
.some() 0:21
.every() 2:35
.find() 3:01
.findIndex() 4:40
Awesome video! Currently doing the Odin Project and your explanations are incredibly good.
I'm currently a ball of stress prepping for a bootcamp interview and I just wanna say that WOAH...WOAAAAAHHH gave me my first laugh in literal days. Thank you, I needed that lmao
Hi Wes Bos, another day, another cardio. I am really enjoying practicing with you.
This JS 30 day challenge is a great idea! fun way of practicing. Thanks for this Wes!
Great video!
However for new programmers: at 2:30, I think someone being a "hot shot" isn't necessarily a good thing. It's important to write code such that it is "self-documenting". By getting rid of the "currentYear" variable, it makes it less clear what you're actually getting from that "new Date()" constructor.
The arrow function prior to that is probably the best iteration of this function just because it declutters. However, an "if" block is also totally acceptable if you feel that is more readable.
If you can make it work its worth!
.some(): 0:20
.every(): 2:32
.find(): 3:01
.findIndex(): 4:39
WOOW WHOAAAAOOOOO
Was deadass laughing so hard that I choked on my water haha
right
Listening to the intro with beats on trips me up every time 😭
I think the `.filter()` approach is an equally preferable approach for the last item. It's kind of a missed opportunity too, to discuss the other parameters of the callback functions for `.map()`, `.filter()`, and `.reduce()`
I initially went with `delete comments[idx]` approach which, while it mutates the original array, does not update its length, and Google searches points me to using `.splice()` instead (as you have done here)
These are just an awesome set of tutorial videos!! I think I should have started with the ES6 tuts first but that is next on the list! Thanks Wes
Opening Music is as awesome as is your style of teaching.
Did you do part 1?
I was about to fall asleep and you go 04:10😂😂😂
You are funny man!😂 Thanks for the video
WO , WOOOOO
4:10 that part made me laugh so hard it was so unexpected 🤣
Found this super helpful - thanks!
I don't know why 4:05 made me laugh, I love it 😭
Nice! No need to create this functions myself anymore! BTW, the console.tab's just awesome, thanks!
Did you know that you can use all these methods for the same thing?
Or else, you can use forEach to do pretty much everything covered in this video 😀
Just had a small query, is there any major disadvantages of using let instead of const - i.e. declaring variables instead of constants?
I have so far seen most tutorials (if not all) have a preference for constants.
But due to my very limited experience in coding & (bad) habits, I find myself using variables so that I can reuse the same without having to reinvent a new constant name.
What I wanted to say is, say in a function I need to use 5 DOM objects at five different times (will never be reused once done with it) - I find it much easier to use a single variable and keep assigning it with a new object as and when needed.
Any help in this direction will be much appreciated. Don't want to develop a bad habit early on :-) .
What is the most sound way to get a table of people's name and year for individuals who are over the age of 19? Is there a way to use .every() method to get this table?
thank you for this videos, and... what is the name of the intro song
you really helpme with this video, Thanks!
You’re welcome!
Why spread slice over using the filter method? Just curious
so nobody is going to ask what song is playing at the beginning?
is it yours ? xD
darude sandstorm
I really like how nimble you are with your lines of code. how did you manage to move a line of code from on line to another? I'm referring to the edit made @1:46
Just press alt (option on mac) + up or down
The Odin projects.
With the last one is simpler if you use filter()
thank you so much mate!
amazing tutorials!
Late to the party! These are really awesome, Wes! Actually commenting for Array Cardio 1, #6. I've typed in your sample code as is but I can't seem to get past an error: null is not an object for category.querySelectorAll.
why did you wrap new date in parenthesis?
Hey man, thank you for your tutorials they are awesome. Can you say me what editor you’re using and the theme with the font please 🙏
TOP comrades! Lets goooooooo
Hey, thanks for all the good work, it's nice to have someone introduce new ES6 features in such a practical fashion :).
Q: Is there a reason not to use .splice(), and do the expansion method? The code ends up looking more verbose and less readable...
AlexTH-cam Splices modifies the original array and return the deleted one. That is why he uses slice :)
If you want to keep the original array intact, but prefer using the splice() method, you can simply do the following:
const newComments = [...comments];
newComments.splice(index, 1);
This ensures that the changes are immutable and is a bit easier to read in my opinion.
PS. Just in case you were wondering, you cannot simply do the splice on the same line (eg. const newComments = [...comments].splice(index, 1);) because splice() will actually return the "removed" item(s) as a new array.
how does he visually copy and paste by moving the cursor in 1:46?
and is there a name to that specific feature on IDEs or text editors?
On VSCODE (Mac) hold 'option' and move with arrow keys up or down
Awesome! Although I use neovim, I made it work with some remap. Thank you :)
Hi Team, Can someone kindly explain why I cant just have this slice in my code instead: ...comments.slice(0, 2),
It works exactly the same. Is there a reason you have put in the second slice rule?
"...comments.slice(index + 1)"
The second part is for the elements that come after that element we are deleting
what are you using for autocompletion? nice video!
feeling like total hotshot.
woah
why we can't just - delete comments[index] is something wrong with this?
oh I understood...
4:10 cracked me up I'm sorry LMAO
How do I get those comments in that awesome font?
change comments style in settings.json in vscode
@@aashiqahmed5273 more specific please.
2:51// in 2034 lux will be 19,, and because of Date() method, allAdults variable's value will be true 😄
Great stuff, I learned :)
Did you do part 1?
@@nicholasberube5957 Yep :)
Did you try his solution for exercise 6 in the console? You can look at my comment on day 1 video for reference. I had to declare another variable to make it work.
Array.prototype methods are nice, but I prefer to use for and while loops, because I'm old and used to these.
Besides, the performance of Array.prototype methods is atrocious on large data sets, across all browsers, while loops perform quite well.
Ok boomer
thank!!
Could someone give me a dummy explanation of how the two splice instructions work?
My brain is fried!
In this video there is two slice, not two splice. The first slice is creating array of elements before the element that we want to delete , and the second slice is doing the same with elements that go after the element we want to delete. And those two arrays are spread inside newComments array.
slice(0,5) cuts the array from the index 0 to index 4 ( second parameter in excluded)
@@vitfl2580 Thank you, my brain is a little less fried now.
@@salthesadmanshark5645 Thanks Sal, much appreciated.
hi do you have your training set in udemy
Woahhh woaahhh! Ahahaha
WOW. WOW.
why so many parenthesis? :(
i like this but iwi sh there more emphasis on teaching. i feel like he's just speeding through solving the problems instead. For someone that just needs a refresher this may be great but for someone that is learning the concepts its a bit hard to follow.
Check out my beginnerjavascript.com course. These videos are more focused on practice where the course is learning
Yo you are so funny
Nice tutorial! What about JavaScript practice with real projects?
That is what the other 28 videos are on JavaScript30.com
Lol
@@WesBos lmao
UH HOTSHOT
4:06
😂
Honestly dude, great content but you go way too quickly in all your videos and it really diminishes the experience.
I get it, we can pause and what not but if it's still too fast 0.75 speed, then you're going to fast.
splice
Did you do part 1?
it is annoying for beiginners
truee....
this console.table method changed my life
4:08 🤣🤣