Compare Revisions

Array.prototype.slice()

Change Revisions

Revision 459289:

Revision 459289 by Brettz9 on

Revision 470413:

Revision 470413 by Shhac on

Title:
Array slice method
Array.prototype.slice
Slug:
Web/JavaScript/Reference/Global_Objects/Array/slice
Web/JavaScript/Reference/Global_Objects/Array/slice
Tags:
"Array", "Array methods"
"Array", "Array methods"
Content:

Revision 459289
Revision 470413
n17            Method of <a href="/en-US/docs/JavaScript/Reference/Gn17            Method of <code><a href="/en-US/docs/JavaScript/Refer
>lobal_Objects/Array" title="JavaScript/Reference/Global_Objects/A>ence/Global_Objects/Array" title="JavaScript/Reference/Global_Obj
>rray"><code>Array</code></a>>ects/Array">Array</a></code> <a href="/en-US/docs/JavaScript/Refe
 >rence/Global_Objects/Array" title="JavaScript/Reference/Global_Ob
 >jects/Array"></a><a href="/en-US/docs/JavaScript/Reference/Global
 >_Objects/Array" title="JavaScript/Reference/Global_Objects/Array"
 >>instances</a>
n44<code><var>Array</var>.slice(<em>begin</em>[, <em>end</em>])</codn44<code><var>array</var>.slice(<em>begin</em>[, <em>end</em>])</cod
>e>>e>
nn58      </dd>
59      <dd>
60        If <code>begin</code> is omitted, <code>slice</code> begi
 >ns from index <code>0</code>.
tt222    <h2>
223      Array.slice
224    </h2>
225    <p>
226      {{Non-standard_header}}&nbsp;<span style="line-height: 1.57
 >2;">Not to be confused with&nbsp;</span><span style="font-family:
 > 'Courier New', 'Andale Mono', monospace; line-height: normal;">A
 >rray.prototype.slice</span>, this<span style="line-height: 1.572;
 >">&nbsp;method of</span> <code style="font-size: 14px;">Array</co
 >de><span style="line-height: 1.572;">&nbsp;is equivalent to using
 ></span> <code style="font-size: 14px;">Array.prototype.slice.call
 ></code><span style="line-height: 1.572;">, the first parameter is
 > the variable for</span> <code style="font-size: 14px;">slice</co
 >de> <span style="line-height: 1.572;">to act upon, followed by <c
 >ode>begin</code> and <code>end</code></span><span style="line-hei
 >ght: 1.572;">.</span>
227    </p>

Back to History