📅  最后修改于: 2022-03-11 15:03:23.258000             🧑  作者: Mango
function replaceAt(array, index, value) {
const ret = array.slice(0);
ret[index] = value;
return ret;
}
const newArray = replaceAt(items, index, "J");