0

How do we use the not ! operator

Pls give an example

21st Jan 2020, 12:57 PM
John Daniel
John Daniel - avatar
2 odpowiedzi
+ 3
Converts the operand to boolean type: true/false. Returns the inverse value. For instance: + alert( !true ); // false + alert( !0 ); // true
21st Jan 2020, 1:02 PM
Jella
Jella - avatar
0
for example, you need to output a range of numbers in the loop from -3 to 3, except 0. write: for (i= -3, 3, i++) { if (i==!0){ console.log(i); } }
21st Jan 2020, 3:22 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar