Skip to content

Commit

Permalink
Merge pull request javascript-tutorial#354 from brentguf/comparisons
Browse files Browse the repository at this point in the history
Comparisons chapter
  • Loading branch information
iliakan authored Feb 3, 2018
2 parents 0c5b90c + 4b4c65a commit 8b8f3f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 1-js/02-first-steps/08-comparison/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Many comparison operators we know from maths:

- Greater/less than: <code>a &gt; b</code>, <code>a &lt; b</code>.
- Greater/less than or equals: <code>a &gt;= b</code>, <code>a &lt;= b</code>.
- Equality check is written as `a == b` (please note the double equation sign `'='`. A single symbol `a = b` would mean an assignment).
- Equality check is written as `a == b` (please note the double equation sign `=`. A single symbol `a = b` would mean an assignment).
- Not equals. In maths the notation is <code>&ne;</code>, in JavaScript it's written as an assignment with an exclamation sign before it: <code>a != b</code>.

[cut]
Expand Down Expand Up @@ -108,7 +108,7 @@ From JavaScript's standpoint that's quite normal. An equality check converts usi

## Strict equality

A regular equality check `"=="` has a problem. It cannot differ `0` from `false`:
A regular equality check `==` has a problem. It cannot differ `0` from `false`:

```js run
alert( 0 == false ); // true
Expand Down Expand Up @@ -146,7 +146,7 @@ There's a non-intuitive behavior when `null` or `undefined` are compared with ot


For a strict equality check `===`
: These values are different, because each of them belong to a separate type of it's own.
: These values are different, because each of them belongs to a separate type of its own.

```js run
alert( null === undefined ); // false
Expand Down

0 comments on commit 8b8f3f6

Please sign in to comment.