Rest & Spread Operators in Javascript | ES6 tutorial | Advance Javascript

preview_player
Показать описание
JavaScript uses three dots (...) for both the rest and spread operators. But these two operators are not the same.

The main difference between rest and spread is that the rest operator puts the rest of some specific user-supplied values into a JavaScript array. But the spread syntax expands iterables into individual elements.

Rest and spread operator in javascript
ES6 tutorial | Modern Javascript | Javascript Beginners tutorial
Basic to Advance Javascript

The spread operator (...) helps you expand iterables into individual elements.

The spread syntax works within array literals, function calls, and initialized property objects to spread the values of iterable objects into separate items. So effectively, it does the opposite thing from the rest operator.

Note: A spread operator is effective only when used within array literals, function calls, or initialized properties objects.
Рекомендации по теме
Комментарии
Автор

Did you find the video useful? Feel free to share this video among your network!
Let's spread the good stuff :)

devrajdpk
Автор

I can easily say that, your all doubts will be cleared after watching this. Amazing🥰🥰

KajalKumari-wtsn
visit shbcf.ru