What is the difference between "spread" and "rest" syntax of JavaScript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the difference between "spread" and "rest" syntax of JavaScript?

The spread and rest seems similar but their operations can be very different. Could you please give some real world examples with respect to dealing various scenarios of website with their use?

22nd Jan 2024, 7:01 AM
Avijit Pal
Avijit Pal - avatar
3 Answers
+ 3
spread distributes, rest collects
22nd Jan 2024, 7:31 AM
Bob_Li
Bob_Li - avatar
+ 2
Bob_Li , can you provide a real world use case scenarioz of these two type syntax?
22nd Jan 2024, 7:39 AM
Avijit Pal
Avijit Pal - avatar