I have this part of project that I need to convert a Number to an Array, then I have to add +1 to every digit
I wrote this code, still it return undefined
function Nbr1(a){
return a.toString().split('').map(Number).forEach( (item, index) => item + 1);
}
console.log(Nbr1(12345))
and I got this result
and when I add console.log to every item in forEach, I got this


mapinstead offorEach.forEach()tells you that.forEach()does not return anything: "Return value:undefined."9? should it be replaced with10or0?