MCPcopy Create free account
hub / github.com/microsoft/SandDance / addElementAtIndex

Function addElementAtIndex

docs/app/js/sanddance-app.js:23275–23279  ·  view source on GitHub ↗
(array, index, itemToAdd)

Source from the content-addressed store, hash-verified

23273 return copy;
23274}
23275function addElementAtIndex(array, index, itemToAdd) {
23276 var copy = array.slice();
23277 copy.splice(index, 0, itemToAdd);
23278 return copy;
23279}
23280function flatten(array) {
23281 var result = [];
23282 array.forEach(function(item) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected