2

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?

1
  • Short Answer: NO, you need to write it as (!(something > something)) and vice-versa. Commented Jul 8, 2017 at 8:34

2 Answers 2

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

Sign up to request clarification or add additional context in comments.

5 Comments

Not all values are transitive to > and <=: NaN > 5 // false, NaN <= 5 // false. So technically not > is not <= in js typesystem.
That's true. I edited my answer to clarify that is for numbers and strings only (which probable is his case)
NaN is a number.
Well, technically... okay, added a clarification wrt this =p
Thank you all for your help! :)
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 !>

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.