What is the difference between == and === in Java script?

Asked by Last Modified  

Follow 1
Answer

Please enter your answer

Experienced Full Stack Developer and Instructor.

== Compares values after type conversion (if necessary). If the two values are of different types, JavaScript tries to convert them to a common type before comparison. === Compares both value and type without type conversion. If the values are of different types, it immediately returns false. ...
read more
== Compares values after type conversion (if necessary). If the two values are of different types, JavaScript tries to convert them to a common type before comparison. === Compares both value and type without type conversion. If the values are of different types, it immediately returns false. Use === whenever possible to avoid unexpected type coercion issues. == can lead to unexpected results due to implicit conversions. read less
Comments

Online Mathematics tutor with 8 years experience(Online Classes for 10th to 12th)

== Compares values after type conversion (if necessary). If the two values are of different types, JavaScript tries to convert them to a common type before comparison. === Compares both value and type without type conversion. If the values are of different types, it immediately returns false. Use ===...
read more
== Compares values after type conversion (if necessary). If the two values are of different types, JavaScript tries to convert them to a common type before comparison. === Compares both value and type without type conversion. If the values are of different types, it immediately returns false. Use === whenever possible to avoid unexpected type coercion issues. == can lead to unexpected results due to implicit conversions. read less
Comments

Related Questions

What are the benefits of online training / e-training when compared to traditional contact training?
time saving and comfortable class time schedule..
Sadhu Sreenivasa Rao
Can a class have interface and vice-versa?
Interface is used to support multiple inheritance only.
Deepa
0 0
7
In what ways is C# similar to Java?
C# and Java share several similarities as both are influenced by C and C++: Object-Oriented Programming (OOP): Both languages are designed with a strong emphasis on OOP principles, including encapsulation,...
Aparna
0 0
5

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

4 Things Every Tech Startup Needs to Know About The Coaching Industry
Knowledge on any subject is widely available to those who wish to learn. However, just gathering knowledge from other people doesn’t guarantee results in business. Results come from applying what...

On the Job training is always best
On the job training always provides an opportunity to learn the best industry practices. While you work on real time you would encounter many challenges that will force you to learn many new things. Class...

How to create a Singleton class?
How to create a Singleton class: Q) What is a singleton class? A) In simple words, a singleton class is a class which can have only one instance at any point of time throughout the application and provides...

Java8 Filters and collectors
Lets say we have collection of strings and we would like to filter (remove) out certain strings from collection. We could achive the same in java 7 and earlier versions import java.util.ArrayList; import...

Android : Application Launch time improvements.
For any standard android application, below 3 components play important roles to show 1st interface to user, so that he/she can interact with the app. 1. Custom Application class : Intialize the components...

Recommended Articles

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

Read full article >

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you