📅  最后修改于: 2022-03-11 15:03:51.788000             🧑  作者: Mango
let givenString = 'vivekgupta';
let insertAtPosition = 5;
let stringToInsert = ' ';
let arrGivenString = [...givenString];
arrGivenString.splice(insertAtPosition, 0, stringToInsert);
let output = arrGivenString.join('');
console.log(output);