mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 21:16:21 +00:00
24 lines
425 B
Markdown
24 lines
425 B
Markdown
---
|
|
date: 2020-11-12
|
|
id: 0617f7af-2e55-40b5-b83a-6157703a9cd6
|
|
title: JavaScript Comparison Operators
|
|
---
|
|
|
|
# Operators
|
|
|
|
``` javascript
|
|
console.log(4 >= 3)
|
|
console.log(4 <= 3)
|
|
console.log(4 == 3)
|
|
console.log(4 != 3)
|
|
console.log(0 == false)
|
|
console.log(0 === false)
|
|
console.log(0 != false)
|
|
console.log(0 !== false)
|
|
```
|
|
|
|
The only value in JavaScript that is not equal to itself is NaN
|
|
|
|
``` javascript
|
|
console.log(NaN == NaN)
|
|
```
|