What is spread operator(...) and what it's actual use? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

What is spread operator(...) and what it's actual use?

Can it be useful 🤔

21st Jul 2019, 1:19 PM
Prince Raj
Prince Raj - avatar
2 Answers
+ 6
Spread operator allows an iterable to expand in places where 0+ arguments are expected. It is mostly used in variable array where there is more than 1 values are expected.It allows us the privilege to obtain a list of parameters from an array. 
21st Jul 2019, 1:34 PM
Ananya Seghal
Ananya Seghal - avatar
+ 6
think you have grains of nuts( number) in your hand(Array) and if you want it to put in your plate(another array) you just spread it in your plate with spread operator (...)
21st Jul 2019, 8:28 PM
Danielov
Danielov - avatar