Overview

suggest change

Most of the magic of destructuring uses the splat (\*) operator.

Example | Result / comment | ––––––––––––––––– | ———————––|a, b = [0,1] | a=0, b=1a, *rest = [0,1,2,3] | a=0, rest=[1,2,3]a, * = [0,1,2,3] | a=0 Equivalent to .first*, z = [0,1,2,3] | z=3 Equivalent to .last

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents