File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ## The ` arguments ` Object
1+ ## オブジェクトの ` arguments `
22
3- Every function scope in JavaScript can access the special variable ` arguments ` .
4- This variable holds a list of all the arguments that were passed to the function.
3+ JavaScriptの全ての関数スコープは` arguments ` と呼ばれる特別な変数にアクセスできます。この変数は関数が受け取った全ての引数を保持する変数です。
54
6- > ** Note :** In case ` arguments ` has already been defined inside the function's
7- > scope either via a ` var ` statement or being the name of a formal parameter,
8- > the ` arguments ` object will not be created.
5+ > ** 注意 :** ` arguments ` が既に ` var ` や正式なパラメーターにより
6+ > 関数のスコープが定義されている場合は
7+ > ` arguments ` オブジェクトは作られません。
98
10- The ` arguments ` object is ** not** an ` Array ` . While it has some of the
11- semantics of an array - namely the ` length ` property - it does not inherit from
12- ` Array.prototype ` and is in fact an ` Object ` .
9+ ` arguments ` オブジェクトは` 配列 ` では** ありません** 。これは配列と同じような -` length ` プロパティと名付けられています- 文法を持っていますが、` Array.prototype ` を継承している訳では無いので、実際` Object ` になります。
1310
14- Due to this, it is ** not** possible to use standard array methods like ` push ` ,
15- ` pop ` or ` slice ` on ` arguments ` . While iteration with a plain ` for ` loop works
16- just fine, it is necessary to convert it to a real ` Array ` in order to use the
17- standard ` Array ` methods on it.
11+ この為、` arguments ` で` push ` や` pop ` 、` slice ` といった通常の配列メソッドは使用する事が** 出来ません** 。プレーンな` for ` ループのような繰り返しでは上手く動作しますが、通常の` Array ` メソッドを使いたい場合は本当の` 配列 ` に変換しなければなりません。
1812
1913### Converting to an Array
2014
You can’t perform that action at this time.
0 commit comments