Understanding arguments, callee, caller, and apply in JavaScript

Source: Internet
Author: User
Arguments this object represents the function being executed and the parameters that call its function. Arguments

This object represents the function being executed and the parameters of the function that calls it.

[Function.] arguments [n]
Parameter function: option. Name of the Function object currently being executed. N: option. The index of the parameter value starting from 0 to be passed to the Function object.
Description

Arguments is a hidden object created in addition to the specified parameters when a function is called. Arguments is an object similar to an array but not an array. It is similar to an array because it has the same access nature and structure as an array, you can use arguments [n] to access the values of a single parameter and have the length attribute of the array length. In addition, the arguments object stores the parameters actually passed to the function, not limited to the list of parameters defined in the function declaration, and cannot explicitly create the arguments object. The arguments object is available only when the function starts.

Test-apply & call

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.