Jump to content

TariqAbu

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by TariqAbu

  1. I'm writing a program that calculates and shows the value of 210 (2 to the 10th power). This is my code and it prints out 2048 instead of the 1024 (the right answer). var result = 2; for (var i = 0; i < 10; i++){ result = result * 2; }; print(result); could someone explain to me what am i missing here?
×
×
  • Create New...