0

Example of... (Spread operator) in JavaScript

What are the real-time examples of spread operator in js

29th Jul 2020, 8:17 AM
paperinflames
paperinflames - avatar
2 ответов
+ 1
Whenever you want to copy any object or an array we use spread operator.. Since with spread we copy the original array or object so we don't mutate the original ones
29th Jul 2020, 9:18 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
paperinflames it is very helpful when you uses immutable js libraries like redux. It is very helpful when you can modify state directly.
29th Jul 2020, 10:23 AM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar