Skip to content

Commit 06a803b

Browse files
committed
Updated Basics Equality README.md
Further documentation about comparison operators.
1 parent dfdc4b9 commit 06a803b

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

Basic_Concepts/Equality/README.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,41 @@
22

33
# Equality
44

5-
Equality description
5+
Equality is when we use comparison operators to find out if both left and right compared value are equal, (AKA the same).
66

77

88
# Course Documentation
99

10-
(this for me to fill up with every element that you use in lessons. syntax explaination and links for more)
1110

12-
## Element to explain
11+
## Comparison, (and logical), Operators
12+
13+
In the code that we used
14+
15+
16+
var a = '26';
17+
var b = 26;
18+
19+
console.log(a==b); // true (only checks value)
20+
console.log(a===b); // false (compares type as well)
21+
22+
23+
Things are straight forward, as we explain the use of equal sign as comparison operator to find out if:
24+
25+
**a==b** the values in both a and b, (variables) are the same
26+
and
27+
**a===b** both the values and the type of a and b variables are the same.
28+
29+
In order to have a better understanding of logical operators here are few more examples of comparison and logical operators.
30+
31+
32+
- **!=** not equal values between a and b (left and right variable/statement).
33+
- **!==** not equal value or not equal type between a and b (left and right variable/statement).
34+
- **>** Left statement greater than right statement.
35+
- **<** Left statement less than right statement.
36+
- **>=** left statement greater than or equal to right statement. and
37+
- **<=** Left statement less than or equal to right statement.
38+
39+
For more informations please visit the documentation page of w3schools [about comparison and logical operators](http://www.w3schools.com/js/js_comparisons.asp).
1340

14-
(for example console.log)
1541

16-
***Links***
17-
- Wikipedia
18-
- Anotherlink,com
42+
> Written with [StackEdit](https://stackedit.io/).

0 commit comments

Comments
 (0)