diff --git a/client/src/pages/guide/english/javascript/comparison-operators/index.md b/client/src/pages/guide/english/javascript/comparison-operators/index.md index 07471598a0..405f6c14c0 100644 --- a/client/src/pages/guide/english/javascript/comparison-operators/index.md +++ b/client/src/pages/guide/english/javascript/comparison-operators/index.md @@ -147,13 +147,17 @@ _You can find more information at , <=, >= etc., "null" and "undefined" ar #### Example - compare null with 0(zero) +```javascript console.log( null > 0 ); // O/P - false console.log( null >= 0 ); // O/P - true console.log( null == 0 ); // O/P - false +``` Strange? As per the first statement null is not greater than 0 and from the second statement null is either greater than or equal to 0. So, if we think mathematically and compare both statements, will come to the result that null is equal to 0. But, as per third statement it's not true. Why? @@ -173,9 +179,11 @@ But, in equality check (==), "null/undefined" works without any conversion and a #### Example - compare undefined with 0(zero) +```javascript console.log( undefined > 0 ); // O/P - false console.log( undefined >= 0 ); // O/P - false console.log( undefined == 0 ); // O/P - false +``` Here, we test the same cases as we did for null but again result is different. Why?