Javascript [Electronic resources] : The Definitive Guide (4th Edition) نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Javascript [Electronic resources] : The Definitive Guide (4th Edition) - نسخه متنی

David Flanagan

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید



7.3 Function Scope: The Call Object



As
described in Chapter 4, the body of a JavaScript
function executes in a local scope that differs from the global
scope. This new scope is created by adding the call object to the
front of the scope chain. Since the call object is part of the scope
chain, any properties of this object are accessible as variables
within the body of the function. Local
variables
declared with the var statement are created as
properties of this object; the parameters of the function are also
made available as properties of the object.

In
addition to local variables and parameters, the call object defines
one special property named arguments. This
property refers to another special object known as the Arguments
object, which is discussed in the next section. Because the
arguments property is a property of the call
object, it has exactly the same status as local variables and
function parameters. For this reason, the

identifier
arguments should be considered a reserved word and
should not be used as a variable or parameter name.


/ 844