I would like to create a dynamic calculator with several amount of input items (user decides)
Let say, I want to sum all the input numbers up and then divide by amount of all inputs that took part in calculating.
How can I do it?
I tried to find sth on YouTube and another posts but unfortunately didnt found. 🙁
>Solution :
maybe try to save all numbers in an array then add them up and devide by the lenght of array
let array = [NUMBERS]
let final = 0
array.forEach(e => {
final += e
});
final /= array.lenght