Seeking help to convert the =(1-PRODUCT(K5:K14))
Excel formula into JavaScript code.
I attempted to write the code based on my own understanding, but the result is not what I expected.
exp_PRODUCT= [
0.993758608,
0.993847362,
0.993934866,
0.994021137,
0.994106197,
0.990118552,
0.990226925,
0.990334122,
0.990440146,
0.990545020
]
let result = 0.0;
for(let prod of exp_PRODUCT){
result = parseFloat(prod) + result;
}
console.log('Total :' ,1-result )
The expected answer is around 7.XXXX%