DEV Community

Discussion on: You don't know spread operator !

Collapse
loclv profile image
LuuVinhLoc

I think there are a case to be made teammate (include me) confused.

a = 8
[...a]
// output 🚀: [1, 2, 3]

// now set it's value again
a = 's'
[...a]
// output 🚀: ['s']
Enter fullscreen mode Exit fullscreen mode