function calculateSumlah(input){
var result = [];
for(var i = 0; i < input.length; i++){
var sumlah = input[i] * 2;
result.push(sumlah);
}
}
calculateSumlah('123')
I have a function that calculates the product of each number in the input array with 2. In this case, the numbers 1, 2, and 3 are multiplied by 2 to get results of 2, 4, and 6 respectively. However, I want to multiply all the sumlah values together. I attempted using *= operator but faced errors.