Guruji Point - Code You Want To Write

  • Home
  • Asp.Net
  • WCF
  • SQL
  • Type Script
  • AngularJS
  • Tech News
  • Blog
  • Earn Online

Saturday, 19 August 2017

What Is The Difference Between == And === In JavaScript

 difference between == and === in javascript, guruji point, Gurujipoint, javascript operaters     No comments   


Introduction
In this article we will learn what is the difference between == and === in javascript with example. When we use == and when to use === in javascript. 

Previous Updates

In previous articles we have learnt  Transaction Commit and Rollback in sql server with example.What is Lock and how to achieve lock on sql table. Authorization in Asp.Net. How high quality content affects your Website. What is Blocking and Deadlock In SQL. Top 30 Asp.net interview question. What is the difference between null and undefined.
Check for null vs undefined in javascript.


JavaScript provides different types of operators. Here, we will be talking about strict equality andType converting equality.

Strict equality (===) means values which we are comparing must have the same type. 

This means "2" will not be equal to 2 ("2"===2 it will return false)

Type converting equality (==) means automatically it will covert the variable to value irrespective of data type; either it is a string or a number. This means "2" will be equal to 2 ("2" == 2 it will return true).


So the double equal (==) is an auto type converting equality and three equals  (===) is a strict equality operator, i.e., it will not covert values automatically.

EXAMPLE
5== "5" // it will return true because here string will converted as number

5 === "5" // it will return false because here 5 is number and "5" is string

  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Facebook Updates

Guruji Point

Categories

Comman table Expression in SQL Dynamic Grid Row IQueryable in c# Learn AngularJS Scope_Identity() Use of indexes comma seperated string in sql row_number() and dense_rank() salary table structure. while loop in sql why do we need cursor why tuple used

About Us

This blog is about the Programming ,Tech News and some intresting facts related Contents. Here you can find fundamental and expert level topic of programming languages very practically related to C# , Asp.Net ,Sql-Server, JavaScript, Jquery, WebServices And also Web-Api, WCF ,WPF, Angular Js.

Contact Us

Email Us - gurujipoints@gmail.com
Contact- 8077657477

Reach Us

Copyright © Guruji Point - Code You Want To Write