Duration
2 min
Access
Free
Transcript
Available

The rest operator in JavaScript allows us to 'collect' arguments dynamically in one variable similar to SCSS variable arguments

This is useful for CSS-in-JS when you have CSS properties like box-shadow that can attach multiple shadows to a single element. With the rest operator, you'll be able to add all the shadows you want to a single argument for use in a JavaScript CSS mixin function.