let total = 5;
function calculateValues(){
  total = total * 2;
}
for(let f = 0; f < 10; f++){
  calculateValues();
}
alert("The total is: " + total);  // "The total is: 5120"