From dc8049df43b473499610438eca35fbc0589f0c79 Mon Sep 17 00:00:00 2001 From: kViking Date: Sun, 11 Nov 2018 18:25:32 -0800 Subject: [PATCH] Minor typo fix (#23059) --- guide/english/javascript/comparison-operators/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/english/javascript/comparison-operators/index.md b/guide/english/javascript/comparison-operators/index.md index 405f6c14c0..b3fa7465ce 100644 --- a/guide/english/javascript/comparison-operators/index.md +++ b/guide/english/javascript/comparison-operators/index.md @@ -163,7 +163,7 @@ How? This is because there is a special rule for "null" and "undefined". Due to If we use comparison operators like <, >, <=, >= etc., "null" and "undefined" are converted to number and in such cases "null" will become 0 and "undefined" will be NaN. Lets check some of those examples. -#### Example - compare null with 0(zero) +#### Example - compare null with 0 (zero) ```javascript console.log( null > 0 ); // O/P - false @@ -177,7 +177,7 @@ The reason is "comparison" and "equality check" both works in different way. In comparison, "null/undefined" is first converted to number so, in first two cases "null" become 0 and hence case1) (null > 0) -> false and case2) (null >= 0) -> true. But, in equality check (==), "null/undefined" works without any conversion and as explained above (special rule), in equality check "null/undefined" are only equal to each other and are not equal to anything else. Hence (null == 0) -> false. -#### Example - compare undefined with 0(zero) +#### Example - compare undefined with 0 (zero) ```javascript console.log( undefined > 0 ); // O/P - false