A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/operators/comparison below:

comparison ยท WebPlatform Docs

comparison Summary

Returns a Boolean value indicating the result of the comparison.

Syntax
expression1 comparisonoperator expression2
expression1
Any expression.
comparisonoperator
Any comparison operator (see Remarks).
expression2
Any expression.
Examples

See Remarks.

var x = 5;
var y = 7;
var z = (x > y); 
var z = (x < y); 
var z = (y >= x); 
var z = (y <= x); 
Remarks

When comparing strings, JavaScript uses the Unicode character value of the string expression.

The following describes how the different groups of operators behave depending on the types and values of expression1 and expression2 :

Relational operators: < , > , <= , >=

Equality operators: == , !=

Identity operators: === , !==

These operators behave the same as the equality operators, except that no type conversion is done. If the types of both expressions are not the same, these expressions always return false.

Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4