Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 583 Bytes

splice_at.md

File metadata and controls

30 lines (23 loc) · 583 Bytes
layout api-command
language JavaScript
permalink api/javascript/splice_at/
command spliceAt
io
array
array
related_commands
insertAt deleteAt changeAt
insert_at/
delete_at/
change_at/

Command syntax

{% apibody %} array.spliceAt(offset, array) → array {% endapibody %}

Description

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)