.Net Programming in Simple

Wednesday, 2 October 2013

Difference Between == and === in Javascript

== only compares values

=== compares values + type


Example

var check1 = '10',
    check2 = 10;

check1 == check2 // true
check1 === check2 // false
Posted by mohanty at 23:19
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: JavaScript and Jquery

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2016 (1)
    • ►  September (1)
  • ►  2014 (15)
    • ►  August (3)
    • ►  July (2)
    • ►  June (2)
    • ►  May (1)
    • ►  February (1)
    • ►  January (6)
  • ▼  2013 (140)
    • ►  December (14)
    • ►  November (4)
    • ▼  October (11)
      • Dynamically setting Postback Trigger For the Updat...
      • Restricting the Page from being Postback
      • isNull with Cast in Sqlserver
      • Hosting a Project in IIS
      • Use of using statement in c#
      • Finalise vs Dispose
      • Read PDF or Word File
      • Difference Between == and === in Javascript
      • Calling server side method after specific time int...
      • Breaking a single column into multiple Columns bas...
      • Javascript Function to Allow Only Numbers in Textbox
    • ►  September (13)
    • ►  August (19)
    • ►  July (29)
    • ►  June (50)

About Me

mohanty
View my complete profile
Simple theme. Powered by Blogger.