Search code examples
javascriptoperatorsrelational

Is there !< and !> in JavaScript?


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?


Solution

  • 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