DEV Community

Discussion on: The tale of three dots in Javascript

Collapse
vuesomedev profile image
Gábor Soós Author

It is just old, not wrong, still runs in Chrome. Bad syntax would be non backward compatible breaking change.

Thread Thread
danielo515 profile image
Daniel Rodríguez Rivero

It is not just old, is wrong. You can of course declare such function because the permissive nature of javascript, but if you try to run it you are going to get an error because arguments is an undefined variable. You can see it yourself in the (hopefully) attached screenshot.
But you don't have to trust me, is on the spec: developer.mozilla.org/en-US/docs/W...

Thread Thread
vuesomedev profile image
Gábor Soós Author

I had a misunderstanding here, thanks for linking the documentation

Thread Thread
danielo515 profile image
Daniel Rodríguez Rivero

No problem. JS is a tricky language (sometimes 😄).