Solution: Loops in JavaScript
Review the solutions to the tasks from the loops challenge.
We'll cover the following...
We'll cover the following...
Solution 1
Here is a possible solution for checking if the number is a multiple of or .
Explanation
-
Line 1: The for loop starts with
ibeing initialized to . It will loop as long as i is less than or equal to . -
Lines 2–10: ...