Js implementations are replaced separately

problem description

put the contents of the array on the horizontal line of the string respectively
arr= [1Magazine 5];
str=" what do you mean _ _ don"t know _"

the environmental background of the problems and what methods you have tried

filling in the blanks wow

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

str1= what are you talking about? 1 5 don"t know 7


var idx=0;
str = str.replace(/\_+/g,()=>{return arr[idxPP];})


:<strong></strong><br>:

    var arr = [1,5,7];
    var str='_________';
    var newStr = new String()
    str.split("_").filter(i => i).map((v, i) => {
        newStr += v + arr[i]
    })
    console.log(newStr)
Menu