#05 - Spread & Rest Operators - Modern Javascript (ES6+) Tutorial

preview_player
Показать описание
In this ES6+ tutorial, we teach you how to split object properties and array elements with the spread operator, as well as how to merge function arguments in arrays with the rest operator.

We cover the following topics:
0:00 - The 3 dots
0:27 - Rest Operator
1:20 - Spread Operator
2:51 - Next up

Check out the Modern Javascript playlist for more ES6+ tutorial videos

Subscribe to the channel and never miss a lesson

Visit the website for a wide range of programming tutorials
Рекомендации по теме
Комментарии
Автор

const sum = (...args: number[]): number => {
return args.sort((a, b) => a - b).reduce((a, b) => a + b, 0);
}
console.log(sum(1, 2, 3, 4, 5));

kvelez