Thor
Thor

Reputation: 10058

JavaScript spread operator ... vs "arguments" array

I'm learning JavaScript by following the book series "You don't know JS".

In the section about spread operator ..., the author mentioned

enter image description here

I have looked at the MDN page on "arguments" and did a search on the keyword depre, but nothing in the page mentions that the arguments is deprecated.

Am I missing something?

Upvotes: 0

Views: 315

Answers (1)

dhilt
dhilt

Reputation: 20754

MDN page on Deprecated and obsolete features in Function properties section says: "The caller and arguments properties are deprecated, because they leak the function caller. Instead of the arguments property, you should use the arguments object inside function closures."

A agreed with @Bergi, you may start an issue on the GitHub to clarify this place.

Upvotes: 1

Related Questions