Home > Computer Science > JavaScript – For Loop 1

JavaScript – For Loop 1

Directions: In JavaScript, using the digits 1 to 9 at most one time each, place a digit in each box to find then total would have the largest number printed to the screen.

Hint

Hint

Be sure to look at how many times the loop iterates, and what it increments by.

Answer

Answer

56 – var i=2; i<9; i+=1 and total +=8

Source: Jesse Darcy

Print Friendly, PDF & Email

Check Also

JavaScript – For Loops 2

Directions: In JavaScript, using the digits 0 to 9 at most one time each, place …

Leave a Reply

Your email address will not be published. Required fields are marked *