let myfunction = function(value) {
  value = value * 2;
  return value;
};
let total = 2;
for (let f = 0; f < 10; f++) {
  total = myfunction(total);
}
alert("The total is " + total);  // "The total is 2048"