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 :)
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.
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 :-) .
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
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?
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.
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.
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.
Awesome! Although I use neovim, I made it work with some remap. Thank you :)
5 років тому
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.
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)"
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.
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 :)
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 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.
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.
.some() 0:21
.every() 2:35
.find() 3:01
.findIndex() 4:40
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
Awesome video! Currently doing the Odin Project and your explanations are incredibly good.
WOOW WHOAAAAOOOOO
Was deadass laughing so hard that I choked on my water haha
right
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!
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!
4:10 that part made me laugh so hard it was so unexpected 🤣
I was about to fall asleep and you go 04:10😂😂😂
WO , WOOOOO
.some(): 0:20
.every(): 2:32
.find(): 3:01
.findIndex(): 4:39
I don't know why 4:05 made me laugh, I love it 😭
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
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)
Listening to the intro with beats on trips me up every time 😭
You are funny man!😂 Thanks for the video
Opening Music is as awesome as is your style of teaching.
Did you do part 1?
Found this super helpful - thanks!
The Odin projects.
With the last one is simpler if you use filter()
Nice! No need to create this functions myself anymore! BTW, the console.tab's just awesome, thanks!
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 :-) .
Woahhh woaahhh! Ahahaha
4:10 cracked me up I'm sorry LMAO
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 😀
thank you so much mate!
you really helpme with this video, Thanks!
You’re welcome!
feeling like total hotshot.
woah
amazing tutorials!
Why spread slice over using the filter method? Just curious
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
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?
why did you wrap new date in parenthesis?
so nobody is going to ask what song is playing at the beginning?
is it yours ? xD
darude sandstorm
thank!!
thank you for this videos, and... what is the name of the intro song
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...
AlexUA-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.
Yo you are so funny
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.
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.
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 🙏
I am pretty sure the font is called Hack
what are you using for autocompletion? nice video!
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 :)
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
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
2:51// in 2034 lux will be 19,, and because of Date() method, allAdults variable's value will be true 😄
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.
WOW. WOW.
hi do you have your training set in udemy
UH HOTSHOT
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
why we can't just - delete comments[index] is something wrong with this?
oh I understood...
How do I get those comments in that awesome font?
change comments style in settings.json in vscode
@@aashiqahmed5273 more specific please.
4:06
😂
why so many parenthesis? :(
Nice tutorial! What about JavaScript practice with real projects?
That is what the other 28 videos are on JavaScript30.com
Lol
@@WesBos lmao
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