Stack How?
Stackorigin – The Community of Question and Answers Latest Articles
Read More About Python List Comprehension with examples
Python List Comprehension: Python List comprehension provides a much more short syntax for creating a new list based on the values of an existing list. Advantages of List Comprehension in Python: Time Efficient than loop Space Efficient than loop Needs ...
Do not accept an offer letter from companies.
Do not accept an offer letter from companies without verifying the following points. Designation Salary Details & CTC Distribution Leave Policies Working Hours & Days Medical Coverage/Insurance Probation Period Notice Period Benefits and Perks Bonus F&F Policy
How to call API using Ajax
AJAX stands for Asynchronous JavaScript and XML and its used for to make calls to the server to fetch some data. In this article, we will learn how to implement a simple API call using AJAX technology. How to use GET ...
Double equals (==) is abstract equality comparison operator, which transforms the operands to the same type before making the comparison.
For example,
Triple equals (===) are strict equality comparison operator, which returns false for different types and different content.
For example,
What is == in JavaScript?
Double equals (==) is a comparison operator, which transforms the operands having the same type before comparison.
So, when you compare string with a number, JavaScript converts any string to a number. An empty string is always converts to zero. A string with no numeric value is converts to NaN (Not a Number), which returns false.
What is === in JavaScript?
=== (Triple equals) is a strict equality comparison operator in JavaScript, which returns false for the values which are not of a similar type. This operator performs type casting for equality. If we compare 2 with “2” using ===, then it will return a false value.
equals operator (== vs ===) should be used in JavaScript comparisons:
The strict equality operator (
===
) behaves identically to the abstract equality operator (==
) except no type conversion is done, and the types must be the same to be considered equal.Using the
==
operator (Equality)Using the
===
operator (Identity)