| about | help | code help+videos | done | prefs |
add
Given an array of Strings, a String element, and an index, return an array with the element inserted in the array at the index. If the index is out of bounds, return the array unchanged.add(["0", "1", "2", "3", "4"], "-1", 2) → ["0", "1", "-1", "2", "3", "4"] add(["A", "B", "C", "D"], "*", -1) → ["A", "B", "C", "D"] add(["A", "B", "C", "D"], "*", 0) → ["*", "A", "B", "C", "D"] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 200
Copyright Nick Parlante 2017 - privacy