Someone told me that there's !< and !> in JavaScript. I tried it but it didn't work. Is there something like this in JavaScript? If not in JavaScript, is it there in any other language?
Asked
Active
Viewed 66 times
2
-
Short Answer: **NO**, you need to write it as `(!(something > something))` and vice-versa. – Mr. Alien Jul 08 '17 at 08:34
2 Answers
4
No. In JavaScript and many other languages (for numbers - not NaN - and strings):
"!<" is >=
"!>" is <=
Check this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators

Alberto Trindade Tavares
- 10,056
- 5
- 38
- 46
-
Not all values are transitive to `>` and `<=`: `NaN > 5 // false`, `NaN <= 5 // false`. So technically `not >` is not `<=` in js typesystem. – zerkms Jul 08 '17 at 08:39
-
That's true. I edited my answer to clarify that is for numbers and strings only (which probable is his case) – Alberto Trindade Tavares Jul 08 '17 at 08:40
-
-
1Well, technically... okay, added a clarification wrt this =p – Alberto Trindade Tavares Jul 08 '17 at 08:42
-
1
1
No !< and !>
are not there in javascript and in most of the other programming languages too. You can try > instead of !< and < instead of !>

Amaan Iqbal
- 761
- 2
- 9
- 25