DEV Community

Discussion on: Understanding Rest Parameter Syntax

Collapse
 
kenbellows profile image
Ken Bellows • Edited

Personally I like the dual use of the ... for rest and spread. They're sort of symmetric operations, and it strikes me as rather intuitive and elegant to use the same symbol, and one you understand the contexts in which they're used (which I think you've explained very well), it feels natural. But that's just me, I'd be interested to hear a counter perspective!

Collapse
 
laurieontech profile image
Laurie

I think once you know them that's absolutely true. But I wouldn't call it intuitive just based on readability. I'm also of the camp that ... was a poor choice. I can make sense of it, but it doesn't invoke much. Perhaps a keyword may have been better.