Given an array, string, and an index, update the element at the given index of the array to the string. Return a new array.
// input:
const a = ['blue', 'red', 'green', 'yellow'], s = 'orange', idx = 2
// output:
['blue', 'red', 'orange', 'yellow']
(Ctrl + ')
Loading...
/* output */
Next(Ctrl + y)