I have created an array of numbers with more than one digit and my idea is to map it so that the new array is the sum of the digits of each number.
Example: If I have the array1 [20, 33, 48] the array 2 would be [2, 6, 12] since I am adding from the first array firstly 2+0, secondly 3+3 and finally 4+8 .
This is what I have come to do but it is not giving me the result.
let numeros_array = [20, 33, 48, 34, 55, 30];
console.log(numeros_array);
let numeros_array2 = numeros_array.toString();
numeros_array2.from;
numeros_array2 = numeros_array.map(x => x+x);
console.log(numeros_array2);