Hi I found it in this way to insert any string or char at any position
function strInsert(str, inxAt) {
let newStr = (str.split("")).reduce((a, b, n) => {
return n === inxAt ? a + "-" + b : a + b
}, '')
return newStr
}
console.log(strInsert("9998888", 3))