| layout | api-command | ||||||
|---|---|---|---|---|---|---|---|
| language | JavaScript | ||||||
| permalink | api/javascript/splice_at/ | ||||||
| command | spliceAt | ||||||
| io |
|
||||||
| related_commands |
|
{% apibody %} array.spliceAt(offset, array) → array {% endapibody %}
Insert several values in to an array at a given index. Returns the modified array.
Example: Hulk and Thor decide to join the avengers.
r.expr(["Iron Man", "Spider-Man"]).spliceAt(1, ["Hulk", "Thor"]).run(conn, callback)