Array.prototype.insert >= 0.1.2

Purpose

Insert item at the given index

Syntax

Array#insert ( Numberindexvalue );

Parameters

index

Where to insert the values

value

Return values

Array

Examples

Insert a single value at the given index

var arr = [0,1,2,3];

arr.insert(2, 'inserted');
>>> [0, 1, 'inserted', 2, 3]

Insert multiple values

var arr = [0,1,2,3];

arr.insert(2, 'i1', 'i2');
>>> [0, 1, 'i1', 'i2', 2, 3]

Comments

Franklyn

Can you tell me what system are you using on this site?

Robbin

Have you ever had troubles with your webhost?

I'm open for referrals as my webhost is terrible right now.

Myra

Do you have any kind of tips for composing articles? That's where I constantly battle and I simply wind up staring vacant display for long period of time.