2 minutes read The ES6 Spread Operator can be used for arrays and objects. Array Spread Operator We define iterables as: strings, arrays, sets.Basically if you can loop over, then your property can be an iterable. The three dots act upon the number or string and it spread each item (character or number). Array Spread Operator for Strings… Read more »
Posts Categorized: Modern JavaScript
How to use the Rest Operator (…) in Object Destructuring
< 1 minute read The Rest Operator (…), three dots, in ES6 comes with some caveats: you can use the rest operator at most once the rest operator must appear at the end What does the rest operator (…) do? It copies all remaining properties of the destructuring source into its operand, without the ones that were already mentioned… Read more »