VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » freeCodeCamp.org
...spread operator and rest operator - Beau teaches JavaScript

...spread operator and rest operator - Beau teaches JavaScript

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
The spread operator (...) spreads out the elements of an array (or iterable object). The rest operator condenses elements. The spread and rest operators are great additions to ES6! - Code: http://codepen.io/beaucarnes/pen/EWabjW?editors=0012 - More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator Beau Carnes on
Date: 2022-03-14

Comments and reviews: 6


const arr1 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY'];
var temp = [ (arr1) => - return [...arr1] - ]
console.log(temp) // says that this is a function
1) what is going on? i just wanna use an annonomous function to return the spread out array
2) pls help me !
3) Thank you!

reply

This video gives 100 times the useful information the website does, which isn't a great thing, since I expect many fewer will see this than will read the page on the rest operator. That said, you're excellent at explaining things. A very good teacher.
reply

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
reply

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.
reply

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-.
reply

It seems to be a mistake as arr1.concat(arr2) will return [0, 1, 2]. It should be arr1 = arr1.concat(arr2) to return [0, 1, 2, 3, 4, 5]
reply
Add a review, comment






Other channel videos