I don't know how to get this loop in depending order. I don't think we have gone over that yet

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
// Setup
const myArray = [];

// Only change code below this line
let i = 0;

while (i < 6) {
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15

Challenge: Iterate with JavaScript While Loops

Link to the challenge:

If the ++ operator increments by 1, which operator do you think decrements by 1?

When you say descending order, it means you should start from the biggest value and keep decrementing that value until you reach the last value! Now implement this using code, How & when would you decrement the value? From what value will you start and when will you stop your loop?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.