Nonzero Numbers explainer

In this puzzle, the “Nonzero Numbers Explained”. Why can’t we use or have access to all the Math Operators and or the Logical Operators (!== or ||)?
Also, is this example valid?

For let i = <0; i >0; i < 4; i++
If (i)

??? Please forgive my syntax…

Hey there, we can take a look at adding those in. In the meantime, you can rewrite the code in the code playground and use them there.

As for your 2nd question:

The first part of a classic for loop is a variable declaration. let i = < 0 is invalid code, because the < operator is used to compare 2 values, and there’s no value on the left side.

Hope this helps!

Thanks for responding.
Do you mean that the For…loop can only have two parameters (right and left sides)?

Thanks, Janho

You are trying to make i do something after the initial for loop. You don’t need to make i do anything as it already looping. Just delete the 'i + ’ line you have.

I had already done that and I finally completed the puzzle. Thanx again, Janho


i am headache

I had a little trouble at first trying to figure out what was wrong until I found out I should’ve been putting the if and then console.log after the for statement instead of putting console.log first and then if and then another console.log. Its not all that hard if you pay enough attention to the guide of how to do a specific thing.

1 Like

Thanks for helping me! I began to study Javascript a few time ago.

1 Like