Javascript for Statement Question 2

Introduction

What is the output of the following code?


// Multiple iterators
for (myNumber = 0, myOtherNumber = 10; myNumber <= 10; myNumber++, myOtherNumber--)
{
  console.log(myNumber + "*" + myOtherNumber + " = " + (myNumber*myOtherNumber));
}


0*10 = 0
1*9 = 9
2*8 = 16
3*7 = 21
4*6 = 24
5*5 = 25
6*4 = 24
7*3 = 21
8*2 = 16
9*1 = 9
10*0 = 0



PreviousNext

Related