The '=' is an assignment operator . An assignment operator assigns a value to its left operand based on the value of its right operand. The first operand must be a variable which assigns the value of its right operand to its left operand. That is, x = y assigns the value of y to x.
The = operator behaves like other operators, so expressions that contain it have a value. This means that you can chain assignment operators as follows: x = y = z = 0 . In this case x, y, and z equal zero.
The "===" is an identity operator returns true if the operands are strictly equal (see above) with no type conversion. It will return false even when their values are equal but they are not of same data type.
For ex: 999 and '999', according to the values are same but they are not of same data type, hence === will return false.
- What is noscript tag?
- What is Browser Object Model
- How to test a string as a literal and as an object ?
- What is Associative Array? How do we use it?
- What's the Difference Between Class and Prototypal Inheritance?
- Event bubbling and Event Capturing in JavScript?