Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const insert = (item, index, array) =>
[...array.slice(0, index),
...item,
...array.slice(index, array.length)];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.