Skip to content
Advertisement

Is there a ‘greater and lesser than’ comparison operator?

Is there an operator that denotes a variable as both greater and lesser than? The following code block is not valid code.

JavaScript

Advertisement

Answer

No. You’d want to use an “AND” operator, &&:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement