SOURCE

let str = "13345157891";
const arr = [...str];
arr.splice(3, 4, '*', '*', '*', '*')
console.log(arr.join(''));
console 命令行工具 X clear

                    
>
console