What will futureValue contain after the for loop has been executed one time? var years = 10; var annualRate = 10; var futureValue = 1000; annualRate = annualRate / 100; for ( i = 1; i <= years; i++ ) { futureValue += futureValue * annualRate; }

Respuesta :

Answer:

One time executed for loop value is "1100".

Explanation:

In the given JavaScript program, three variable "years, annualRate and futureValue is declare, in which all variable assign a value, that is "10, 10, and 1000".

  • In the next step, a variable annualRate divides its value by 100 so, it will give "0.1", then a for loop is declare, that uses variable i, which starts from 1 and ends when the value of i is less than equal to years variable, but in this program, there is no need of loop.
  • Inside the loop, the future variable calculates the value and to print its value there we use print method to print its value, that is equal to "1100".
ACCESS MORE