{"id":4300,"date":"2024-04-19T07:30:35","date_gmt":"2024-04-19T07:30:35","guid":{"rendered":"https:\/\/learn.onemonth.com\/?p=4300"},"modified":"2024-04-19T12:28:18","modified_gmt":"2024-04-19T12:28:18","slug":"difference-between-equal-signs-javascript","status":"publish","type":"post","link":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/","title":{"rendered":"The Difference Between == and === In JavaScript"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">If you aren\u2019t sure what the difference between == and === are in JavaScript, you aren\u2019t alone. Plenty of people struggle with which of these two JavaScript operators you should use<\/span> <span style=\"font-weight: 400;\">so don\u2019t feel bad that you don\u2019t know the difference. First things first, we need to understand what operators are, as well as how they work in JavaScript.<\/span><\/p>\n<h2><b>What does the \u201c==\u201d do exactly?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">In JavaScript, the \u201c==\u201d operator is a comparison operator. This means that you can perform logic tests to see if one thing is equal to another thing. The result will always return either true or false.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">With \u201c==\u201d, JavaScript does not care what data type (string or integer) you pass to it as long as the content that you provided it with matches.<\/span><\/p>\n<p><code>\u201c55\u201d == \u201c55\u201d<br \/>\ntrue<br \/>\n55 == 55<br \/>\ntrue<br \/>\n\u201c55\u201d == 55<br \/>\ntrue<br \/>\n<\/code><\/p>\n<h2><b>How is \u201c===\u201d any different from \u201c==\u201d?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">The \u201c===\u201d operator compares both <\/span><b>content<\/b> <i><span style=\"font-weight: 400;\">and<\/span><\/i> <b>type<\/b><span style=\"font-weight: 400;\">, whereas \u201c==\u201d compares only content. JavaScript counts anything that is in between the two quotation marks as a <\/span><b>string<\/b><span style=\"font-weight: 400;\">. Earlier I mentioned that we will be using the numbers \u201c55\u201d and 55, except, \u201c55\u201d is not an integer, it is a string, whereas 55 is an <\/span><b>integer<\/b><span style=\"font-weight: 400;\"> because it is not encapsulated by quotation marks.<\/span><\/p>\n<p><code>\u201c55\u201d === \u201c55\u201d<br \/>\ntrue<br \/>\n55 === 55<br \/>\ntrue<br \/>\n\u201c55\u201d === 55<br \/>\nfalse<br \/>\n<\/code><\/p>\n<p><span style=\"font-weight: 400;\">For example, this means that if you have the numbers 55 and \u201c55\u201d and try comparing them with the \u201c===\u201d operator that it will not only compare the contents of the two data or variables you pass to it, it will also compare the <\/span><b>typeof<\/b><span style=\"font-weight: 400;\"> variable or data it is. In this case, it would return false, because a string is not the same data type as an integer.<\/span><\/p>\n<h2><b>How can I compare == vs. === on my own?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Answer: Learn <\/span><a href=\"https:\/\/developers.google.com\/web\/tools\/chrome-devtools\/\"><span style=\"font-weight: 400;\">Chrome\u2019s DevTools<\/span><\/a><span style=\"font-weight: 400;\">! DevTools (also known as Web Inspector) is a web developer\u2019s best friend. They allow you to edit <\/span><i><span style=\"font-weight: 400;\">any<\/span><\/i><span style=\"font-weight: 400;\"> website locally in real time. And they allow you to use their <\/span><b>console <\/b><span style=\"font-weight: 400;\">feature to perform logic tests, write simple functions and much more. Check out this <\/span><a href=\"https:\/\/learn.onemonth.com\/learn-devtools-inspect\/\"><span style=\"font-weight: 400;\">Chrome\u2019s DevTools Tutorial<\/span><\/a><span style=\"font-weight: 400;\"> if you\u2019d like to learn more. <\/span><\/p>\n<h2><b>The best way to test == vs. === in JavaScript<\/b><\/h2>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Open DevTools by pressing down <\/span><i><span style=\"font-weight: 400;\">Command+Shift+I <\/span><\/i><span style=\"font-weight: 400;\">(Mac) or by right-clicking anywhere on the screen and selecting \u201cInspect\u201d.<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> Click on the \u201cconsole\u201d tab. From there you will be able to perform logic tests using JavaScript. Type in <\/span><b>\u201c55\u201d === 55<\/b><span style=\"font-weight: 400;\"> and you\u2019ll see it returns <\/span><i><span style=\"font-weight: 400;\">false<\/span><\/i><span style=\"font-weight: 400;\">. And yet, when you pass <\/span><b>\u201c55\u201d == 55<\/b><span style=\"font-weight: 400;\"> the result is true. Magical!<\/span><\/li>\n<\/ol>\n<figure id=\"attachment_4301\" aria-describedby=\"caption-attachment-4301\" style=\"width: 1571px\" class=\"wp-caption alignnone\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-4301 size-full\" src=\"https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image1-3.png?resize=1571%2C852&#038;ssl=1\" alt=\"The Difference Between == and === In JavaScript\" width=\"1571\" height=\"852\" srcset=\"https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image1-3.png?w=1571&amp;ssl=1 1571w, https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image1-3.png?resize=300%2C163&amp;ssl=1 300w, https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image1-3.png?resize=768%2C417&amp;ssl=1 768w, https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image1-3.png?resize=1030%2C559&amp;ssl=1 1030w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption id=\"caption-attachment-4301\" class=\"wp-caption-text\">The Difference Between == and === In JavaScript<\/figcaption><\/figure>\n<p>You can even test your JavaScript just using variables! Just clear your console by right-clicking then pressing \u201cClear console\u201d, then try it out!<\/p>\n<h2><b>What about the != operator and !==?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">You can also compare if something is \u201c!=\u201d (not equal to) something else, and if something is \u201c!==\u201d (strictly not equal to) something else. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">When testing if <\/span><b>\u201c55\u201d !== \u00a055<\/b><span style=\"font-weight: 400;\"> \u00a0with the !== operator, the answer returned will be true because the string \u201c55\u201d is not strictly equal to the integer 55.<\/span><\/p>\n<figure id=\"attachment_4304\" aria-describedby=\"caption-attachment-4304\" style=\"width: 1451px\" class=\"wp-caption alignnone\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-4304 size-full\" title=\"The Difference Between == and === In JavaScript\" src=\"https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image3-1.png?resize=1451%2C520&#038;ssl=1\" alt=\"The Difference Between == and === In JavaScript\" width=\"1451\" height=\"520\" srcset=\"https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image3-1.png?w=1451&amp;ssl=1 1451w, https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image3-1.png?resize=300%2C108&amp;ssl=1 300w, https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image3-1.png?resize=768%2C275&amp;ssl=1 768w, https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image3-1.png?resize=1030%2C369&amp;ssl=1 1030w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption id=\"caption-attachment-4304\" class=\"wp-caption-text\">The Difference Between == and === In JavaScript<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">Be sure to mess around with console using different types of data until you get it down to a science, if you are still confused then be sure to check out <\/span><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/Comparison_Operators\"><span style=\"font-weight: 400;\">Mozilla&#8217;s Comparison Operators<\/span><\/a><span style=\"font-weight: 400;\"> page which goes into further detail. Then when you are ready, take your newly learned superpowers of JavaScript truthiness to the races in the <\/span><a href=\"https:\/\/eqeq.js.org\/\"><span style=\"font-weight: 400;\">JavaScript Equality Table Game<\/span><\/a><span style=\"font-weight: 400;\">!<\/span><\/p>\n<h2><b>Final Thoughts <\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Thanks for taking the time to read a little about operators and operands in JavaScript. If you are a beginner or someone who knows some of the basics and want to learn more about the language of JavaScript, be sure to check out One Month\u2019s <\/span><a href=\"https:\/\/onemonth.com\/courses\/javascript\"><span style=\"font-weight: 400;\">Learn JavaScript Course<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you aren\u2019t sure what the difference between == and === are in JavaScript, you aren\u2019t alone. Plenty of people struggle with which of these two JavaScript operators you should use so don\u2019t feel bad that you don\u2019t know the difference. First things first, we need to understand what operators are, as well as how [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":4301,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[219],"tags":[3437,3433,3431,3419,3421,3439,3423,101,3427,3441,3443,624,110,3417],"class_list":["post-4300","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code","tag-vs","tag-difference-between-and-in-javascript","tag-difference-between-and-in-typescript","tag-differences-in-code","tag-differences-in-javascript","tag-double-equal-vs-triple-equal","tag-how-to-code-in-javascript","tag-javascript","tag-javascript-vs-null-difference-between-and-in-jquery","tag-javascript-double-vs-tripple-equal","tag-javascript-equal-signs","tag-learn-javascript","tag-learn-to-code","tag-the-difference-between-and-in-javascript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>The Difference Between == and === In JavaScript - Learn to code in 30 Days!<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Difference Between == and === In JavaScript - Learn to code in 30 Days!\" \/>\n<meta property=\"og:description\" content=\"If you aren\u2019t sure what the difference between == and === are in JavaScript, you aren\u2019t alone. Plenty of people struggle with which of these two JavaScript operators you should use so don\u2019t feel bad that you don\u2019t know the difference. First things first, we need to understand what operators are, as well as how [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn to code in 30 Days!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/OneMonthEdu\/\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/castiglione\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-19T07:30:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-19T12:28:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image1-3.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1571\" \/>\n\t<meta property=\"og:image:height\" content=\"852\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Chris Castiglione\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/www.twitter.com\/castig\" \/>\n<meta name=\"twitter:site\" content=\"@onemonthedu\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Chris Castiglione\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/difference-between-equal-signs-javascript\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/difference-between-equal-signs-javascript\\\/\"},\"author\":{\"name\":\"Chris Castiglione\",\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/#\\\/schema\\\/person\\\/8dc1aca571379024e84218939bad4489\"},\"headline\":\"The Difference Between == and === In JavaScript\",\"datePublished\":\"2024-04-19T07:30:35+00:00\",\"dateModified\":\"2024-04-19T12:28:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/difference-between-equal-signs-javascript\\\/\"},\"wordCount\":606,\"publisher\":{\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/difference-between-equal-signs-javascript\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/learn.onemonth.com\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/image1-3.png?fit=1571%2C852&ssl=1\",\"keywords\":[\"== vs. ===\",\"difference between != and !== in javascript\",\"difference between == and === in typescript\",\"differences in code\",\"differences in javascript\",\"double equal vs. triple equal\",\"how to code in javascript\",\"JavaScript\",\"javascript == vs === null difference between == and === in jquery\",\"javascript double vs. tripple equal\",\"javascript equal signs\",\"Learn JavaScript\",\"Learn To Code\",\"The Difference Between == and === In JavaScript\"],\"articleSection\":[\"Learn to Code\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/difference-between-equal-signs-javascript\\\/\",\"url\":\"https:\\\/\\\/learn.onemonth.com\\\/difference-between-equal-signs-javascript\\\/\",\"name\":\"The Difference Between == and === In JavaScript - Learn to code in 30 Days!\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/difference-between-equal-signs-javascript\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/difference-between-equal-signs-javascript\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/learn.onemonth.com\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/image1-3.png?fit=1571%2C852&ssl=1\",\"datePublished\":\"2024-04-19T07:30:35+00:00\",\"dateModified\":\"2024-04-19T12:28:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/difference-between-equal-signs-javascript\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/learn.onemonth.com\\\/difference-between-equal-signs-javascript\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/difference-between-equal-signs-javascript\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/learn.onemonth.com\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/image1-3.png?fit=1571%2C852&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/learn.onemonth.com\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/image1-3.png?fit=1571%2C852&ssl=1\",\"width\":1571,\"height\":852,\"caption\":\"The Difference Between == and === In JavaScript\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/difference-between-equal-signs-javascript\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/learn.onemonth.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The Difference Between == and === In JavaScript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/#website\",\"url\":\"https:\\\/\\\/learn.onemonth.com\\\/\",\"name\":\"Learn to code in 30 Days!\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/learn.onemonth.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/#organization\",\"name\":\"One Month\",\"url\":\"https:\\\/\\\/learn.onemonth.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i2.wp.com\\\/learn.onemonth.com\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/Screen-Shot-2017-09-11-at-2.33.59-PM.png?fit=466%2C114&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i2.wp.com\\\/learn.onemonth.com\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/Screen-Shot-2017-09-11-at-2.33.59-PM.png?fit=466%2C114&ssl=1\",\"width\":466,\"height\":114,\"caption\":\"One Month\"},\"image\":{\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/OneMonthEdu\\\/\",\"https:\\\/\\\/x.com\\\/onemonthedu\",\"https:\\\/\\\/instagram.com\\\/onemonthedu\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/one-month-inc-\\\/\",\"http:\\\/\\\/youtube.com\\\/c\\\/onemonth\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/learn.onemonth.com\\\/#\\\/schema\\\/person\\\/8dc1aca571379024e84218939bad4489\",\"name\":\"Chris Castiglione\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8fe82d1d7e14e57ba0d345f2f59a32ed805d05f2a3cba7079453e7ba481f79b3?s=96&d=monsterid&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8fe82d1d7e14e57ba0d345f2f59a32ed805d05f2a3cba7079453e7ba481f79b3?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8fe82d1d7e14e57ba0d345f2f59a32ed805d05f2a3cba7079453e7ba481f79b3?s=96&d=monsterid&r=g\",\"caption\":\"Chris Castiglione\"},\"description\":\"Co-founder of Console.xyz. Adjunct Prof at Columbia University Business School.\",\"sameAs\":[\"http:\\\/\\\/www.castig.org\",\"http:\\\/\\\/www.facebook.com\\\/castiglione\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/www.twitter.com\\\/castig\"],\"url\":\"https:\\\/\\\/learn.onemonth.com\\\/author\\\/chris\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The Difference Between == and === In JavaScript - Learn to code in 30 Days!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/","og_locale":"en_US","og_type":"article","og_title":"The Difference Between == and === In JavaScript - Learn to code in 30 Days!","og_description":"If you aren\u2019t sure what the difference between == and === are in JavaScript, you aren\u2019t alone. Plenty of people struggle with which of these two JavaScript operators you should use so don\u2019t feel bad that you don\u2019t know the difference. First things first, we need to understand what operators are, as well as how [&hellip;]","og_url":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/","og_site_name":"Learn to code in 30 Days!","article_publisher":"https:\/\/www.facebook.com\/OneMonthEdu\/","article_author":"http:\/\/www.facebook.com\/castiglione","article_published_time":"2024-04-19T07:30:35+00:00","article_modified_time":"2024-04-19T12:28:18+00:00","og_image":[{"width":1571,"height":852,"url":"https:\/\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image1-3.png","type":"image\/png"}],"author":"Chris Castiglione","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/www.twitter.com\/castig","twitter_site":"@onemonthedu","twitter_misc":{"Written by":"Chris Castiglione","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/#article","isPartOf":{"@id":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/"},"author":{"name":"Chris Castiglione","@id":"https:\/\/learn.onemonth.com\/#\/schema\/person\/8dc1aca571379024e84218939bad4489"},"headline":"The Difference Between == and === In JavaScript","datePublished":"2024-04-19T07:30:35+00:00","dateModified":"2024-04-19T12:28:18+00:00","mainEntityOfPage":{"@id":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/"},"wordCount":606,"publisher":{"@id":"https:\/\/learn.onemonth.com\/#organization"},"image":{"@id":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image1-3.png?fit=1571%2C852&ssl=1","keywords":["== vs. ===","difference between != and !== in javascript","difference between == and === in typescript","differences in code","differences in javascript","double equal vs. triple equal","how to code in javascript","JavaScript","javascript == vs === null difference between == and === in jquery","javascript double vs. tripple equal","javascript equal signs","Learn JavaScript","Learn To Code","The Difference Between == and === In JavaScript"],"articleSection":["Learn to Code"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/","url":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/","name":"The Difference Between == and === In JavaScript - Learn to code in 30 Days!","isPartOf":{"@id":"https:\/\/learn.onemonth.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/#primaryimage"},"image":{"@id":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image1-3.png?fit=1571%2C852&ssl=1","datePublished":"2024-04-19T07:30:35+00:00","dateModified":"2024-04-19T12:28:18+00:00","breadcrumb":{"@id":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/#primaryimage","url":"https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image1-3.png?fit=1571%2C852&ssl=1","contentUrl":"https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image1-3.png?fit=1571%2C852&ssl=1","width":1571,"height":852,"caption":"The Difference Between == and === In JavaScript"},{"@type":"BreadcrumbList","@id":"https:\/\/learn.onemonth.com\/difference-between-equal-signs-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/learn.onemonth.com\/"},{"@type":"ListItem","position":2,"name":"The Difference Between == and === In JavaScript"}]},{"@type":"WebSite","@id":"https:\/\/learn.onemonth.com\/#website","url":"https:\/\/learn.onemonth.com\/","name":"Learn to code in 30 Days!","description":"","publisher":{"@id":"https:\/\/learn.onemonth.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learn.onemonth.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/learn.onemonth.com\/#organization","name":"One Month","url":"https:\/\/learn.onemonth.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learn.onemonth.com\/#\/schema\/logo\/image\/","url":"https:\/\/i2.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2017\/09\/Screen-Shot-2017-09-11-at-2.33.59-PM.png?fit=466%2C114&ssl=1","contentUrl":"https:\/\/i2.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2017\/09\/Screen-Shot-2017-09-11-at-2.33.59-PM.png?fit=466%2C114&ssl=1","width":466,"height":114,"caption":"One Month"},"image":{"@id":"https:\/\/learn.onemonth.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/OneMonthEdu\/","https:\/\/x.com\/onemonthedu","https:\/\/instagram.com\/onemonthedu\/","https:\/\/www.linkedin.com\/company\/one-month-inc-\/","http:\/\/youtube.com\/c\/onemonth"]},{"@type":"Person","@id":"https:\/\/learn.onemonth.com\/#\/schema\/person\/8dc1aca571379024e84218939bad4489","name":"Chris Castiglione","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8fe82d1d7e14e57ba0d345f2f59a32ed805d05f2a3cba7079453e7ba481f79b3?s=96&d=monsterid&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8fe82d1d7e14e57ba0d345f2f59a32ed805d05f2a3cba7079453e7ba481f79b3?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8fe82d1d7e14e57ba0d345f2f59a32ed805d05f2a3cba7079453e7ba481f79b3?s=96&d=monsterid&r=g","caption":"Chris Castiglione"},"description":"Co-founder of Console.xyz. Adjunct Prof at Columbia University Business School.","sameAs":["http:\/\/www.castig.org","http:\/\/www.facebook.com\/castiglione","https:\/\/x.com\/http:\/\/www.twitter.com\/castig"],"url":"https:\/\/learn.onemonth.com\/author\/chris\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/learn.onemonth.com\/wp-content\/uploads\/2019\/06\/image1-3.png?fit=1571%2C852&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/learn.onemonth.com\/wp-json\/wp\/v2\/posts\/4300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learn.onemonth.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learn.onemonth.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learn.onemonth.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/learn.onemonth.com\/wp-json\/wp\/v2\/comments?post=4300"}],"version-history":[{"count":2,"href":"https:\/\/learn.onemonth.com\/wp-json\/wp\/v2\/posts\/4300\/revisions"}],"predecessor-version":[{"id":4306,"href":"https:\/\/learn.onemonth.com\/wp-json\/wp\/v2\/posts\/4300\/revisions\/4306"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/learn.onemonth.com\/wp-json\/wp\/v2\/media\/4301"}],"wp:attachment":[{"href":"https:\/\/learn.onemonth.com\/wp-json\/wp\/v2\/media?parent=4300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learn.onemonth.com\/wp-json\/wp\/v2\/categories?post=4300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learn.onemonth.com\/wp-json\/wp\/v2\/tags?post=4300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}