Thank you. These aren't well explained as I was going through the exercises on the website. I came here looking for better understanding.I get them now. Very useful.
totally agree ! they didn'te xplain how to copy the array, they just said "const spreaded = ...arr; // will throw a syntax error" which confuse the hell out of u
I just found the series "Beau teaches JavaScript," and boy, this is the best JavaScript tutorial series (at least about the topics covered). He is straight to the point, has a clear and clean voice that is easy to understand, and uses a good speech pace. Well, anyway, You got a new sub with notifications on ;)
When passing elements of an array as arguments to a function, we can also use destructuring assignment: function ( [x, y, z] ). In this case when we call the function we don't need to use the spread operator...
Thanks...I'm in the middle of these exercises for the FCC javascript cert now; Sometimes the directions aren't clear to me or confusing...(visual learner, I guess).
Actually if we pass the extra arguments to the function it is not ignored by the function, rather it will accept those arguments as additional arguments, such function with additional arguments are known as "Varargs".
I remember being here, watching this video, doing some exercises. But here I am again, not having a slight idea what spread and rest operators are. fml
...Spread operator allows an array to get more elements. arr1.concat(arr2) == [...arr1, ...arr2]; //you can add more elements unlike .concat() function ...Rest operator allows a function to get more arguments. var multiply = (multiplier, ...args) => args.map( (element) => multiplier * element ); console.log(multiply(2, 1, 2, 3)); () means function => means return map() method creates a new array with the results of calling a function for every array element.
I don't understand the statment at 5:18 where you explain how you know the difference between the spred opperator and the rest opperator. They look the same to me and seem to be used the same. Perhaps I do not undersatnd what is means to be "passed into an argument as a function." Could someone elaborate?
Could you explain how spread operator is helpful in the second scenario. I was't expecting this half explanation. What's the use of spread operator in the second example. Why we use it then.
...Spread operator allows an array to get more elements. arr1.concat(arr2) == [...arr1, ...arr2]; //you can add more elements unlike .concat() function ...Rest operator allows a function to get more arguments. var multiply = (multiplier, ...args) => args.map( (element) => multiplier * element ); console.log(multiply(2, 1, 2, 3)); () means function => means return map() method creates a new array with the results of calling a function for every array element.
"use your code for good" - loved it
Thank you. These aren't well explained as I was going through the exercises on the website. I came here looking for better understanding.I get them now. Very useful.
Totally agree to you man :D..
Makes much more sense in the video
Same!
totally agree ! they didn'te xplain how to copy the array, they just said "const spreaded = ...arr; // will throw a syntax error" which confuse the hell out of u
Yep, they said they would go through spread & rest operators in detail later (under basic JS) but they didnt. So glad Im not the only one :)
Haha. Same
Thank you. The FCC exercise had poor explanation and the concept here is well expanded and is clear. Thumbs up!
i find the real only curriculum is very confusing at times and speed up. This did also help me.
I just found the series "Beau teaches JavaScript," and boy, this is the best JavaScript tutorial series (at least about the topics covered). He is straight to the point, has a clear and clean voice that is easy to understand, and uses a good speech pace. Well, anyway, You got a new sub with notifications on ;)
I love this.
Clear, not excessively long, right to the point.
Why is this video not embedded in the ES6 "rest" and "spread" pages!!??
Get a hint will get you here ;3
Love your voice and your straightforward explanations Beau. Very good tutorials.
Great - thanks for your help in understanding this. Useful to see the different use cases explained together.
Thanks for the explanation. The FCC exercise explanation sucked.
Harsh but accurate.
Wow! You did a great job here in your explanations. I can't just pass without saying "God will continue to bless you with more knowledge".
Straight forward and useful explanation. Pretty helpful.
Thanks Beau. I was stuck on the FCC lesson about REST parameters and this really explained it well.
Thank you thanks you thank you. I was stuck after getting about 50% progress and I needed to redo the whole course because my fundamentals were wrong.
Thanks for the clear and precise explanation of the 3 dots !
This is extremely helpful and well explained. Thank you, Beau!
Thank you! This is superb addition to the website tutorial!
also a nice tip with spread operator: if you're using react, instead of passing props like:
```
render() {
const {key, title, summary, imageURL} = this.state;
return (
//some stuff
//other stuff
}
```
you can do:
```
render() {
const {...myComponentProps} = this.state;
return (
//some stuff
//other stuff
}
```
I still haven't finished JS yet so, maybe I'll get it later. thx tho ;3
Crystal clear, thank you Beau!
Thanks, man a quick and concise video. Now the concept was clear. Kudos to you. :)
Great! You explained this well and made it easy to understand. I loved all the examples--really nailed it down for me. Thanks~
so simple, so useful and so badly explained. this video made it much more clear for me, thanks!
Legit the best Javascript teaching series in youtube!
Concise and informative. Much appreciated.
this is the best explain for those methods. many thanks.
Thank you so much for this video. Short and well explained
When passing elements of an array as arguments to a function, we can also use destructuring assignment:
function ( [x, y, z] ). In this case when we call the function we don't need to use the spread operator...
Wow! You made this so simple. THANK YOU!!!
Thank you, Very good explanation. Understood clearly about Spread and rest Operator
Thanks...I'm in the middle of these exercises for the FCC javascript cert now; Sometimes the directions aren't clear to me or confusing...(visual learner, I guess).
Thanks for such a great explanation. Helped me make some sense of it.
Now I know how to spread... Woo!
Beau is awesome teacher !!! But I couldn't find any video tutorials regarding to ES6 on freeCodeCamp ! But finally found 'em on RUclips ! :)
Awesome! Exactly what I was looking for. Clear explanation. Thanks
thanks )) you are one of the best teaacher in js in the world
Very simple explanation, thank you very much
Thank you. Very useful explanation. Great job Beau!
Concise and to the poin! Thanks a ton
Thank you, your explanation is very clear and to the point!
Don't forget to subscribe and remember, USE YOUR CODE FOR GOOD!
Thanks for the great explanation.
Beau, you are the best! Thank you!👍👍👍
Thank you for this video. I spent way too long trying to decipher the documentation at MDN.
Actually if we pass the extra arguments to the function it is not ignored by the function, rather it will accept those arguments as additional arguments, such function with additional arguments are known as "Varargs".
Well Explained. I did not have to watch the video twice to understand
Awesome. Simple and meaningful.
Again, thanks for the succinct explanation
Thanks! ES6 course is so badly made, so this helps.
It was an awesome explanation for rest of my life
Thank you for doing these videos! Really helped me !
Just excellent explanation.Thank you
const sum = (x, y, z) => {
const args = [x, y, z];
return args.reduce((a, b) => a + b, 0);
}
so easily explained, thank you
Very interesting! Can't wait to use it. Thank you!
So good. Highly recommended!
Really nice. I'll be using your videos as a reference point.
VERY fluid explanation thanks FCC! Btw the excersizes' explanation needs a change!
I remember being here, watching this video, doing some exercises. But here I am again, not having a slight idea what spread and rest operators are. fml
Simple yet powerful.
Thank you, very helpful!
great explanation thank you! although the last one about the rest operator is still confusing
...Spread operator allows an array to get more elements.
arr1.concat(arr2) == [...arr1, ...arr2]; //you can add more elements unlike .concat() function
...Rest operator allows a function to get more arguments.
var multiply = (multiplier, ...args) => args.map( (element) => multiplier * element );
console.log(multiply(2, 1, 2, 3));
() means function
=> means return
map() method creates a new array with the results of calling a function for every array element.
I am on my 3rd year of IT degree . I got to know this today
Genial , super bien explicado!! ..
Great, clear explanation. Well done. 🙏 thnaks a lot
clear as crystal, thanks
GREAT VIDEO FOR ROOKIE CODERS 🙏
Thank you for the clear explanation
clear and simple and to the point amazing
explained beautifully!
Excellent presentation.
Beau is my hero!
Great explanation thanks so much
Thank you for this video!!!
makes a little more sense but I'm still on shaky legs here. will keep working with these operators until the lightbulb goes off.
They should add this video to FreeCodeCamp because they have watered down the explanation on "Use the Rest Parameter with Function Parameters".
well thank you so much , I was earlier just so confused now I am clear
Thanks Beau! This I understand.
spread operator also prevents state mutation
Respeact very very clear is unsdrenstand
in this section we talked about spread out arrays. here's another helpful link for spread object. ruclips.net/video/MpnzQozwLGI/видео.html
Best video i have ever watched ❤
Man the ES6 lessons are all so awfully bad explained on fcc :( Thanks so much for the explanation that helped a bit :(
@@MasterofLightning totally, i thought i was going crazy. glad it's not just me
the best tutorials
u are a great teacher
Thank you for this Bo
Thank you much, super clear
Great explanation, thanks!
amazing tut! appreciate a bunch!
Great tutorial thank you!
What will happen if you have nested arrays? For example, [[1,2], ["three", "four"]]
//return []
try yourself in dev tools JS console
var multiply = (multiplier, ...args) => args.map( (element) => multiplier * element );
console.log(multiply([[1,2], ["three", "four"]]));
Excellent video
Nice explanation
Thanks, really helpful
good is something very subjective
beau, you're awesome.
To convert string to array
let str = "Hello";
let x = [...str];
thanks for explanation! btw, what about the rest - rest? )
I don't understand the statment at 5:18 where you explain how you know the difference between the spred opperator and the rest opperator. They look the same to me and seem to be used the same. Perhaps I do not undersatnd what is means to be "passed into an argument as a function." Could someone elaborate?
Could you explain how spread operator is helpful in the second scenario. I was't expecting this half explanation. What's the use of spread operator in the second example. Why we use it then.
...Spread operator allows an array to get more elements.
arr1.concat(arr2) == [...arr1, ...arr2]; //you can add more elements unlike .concat() function
...Rest operator allows a function to get more arguments.
var multiply = (multiplier, ...args) => args.map( (element) => multiplier * element );
console.log(multiply(2, 1, 2, 3));
() means function
=> means return
map() method creates a new array with the results of calling a function for every array element.
So spread operator can add as 3 individual values(from array) without iteration?
Omg.This is awesome!