📅  最后修改于: 2022-03-11 15:01:18.452000             🧑  作者: Mango
var a = "I want apple";
var b = " an";
var position = 6;
var output = [a.slice(0, position), b, a.slice(position)].join('');
console.log(output);