<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: swolecoder</title>
    <description>The latest articles on DEV Community by swolecoder (@swolecoder).</description>
    <link>https://dev.to/swolecoder</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F399904%2F8a67cfbb-909e-449c-84c3-886ccd75b833.jpeg</url>
      <title>DEV Community: swolecoder</title>
      <link>https://dev.to/swolecoder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/swolecoder"/>
    <language>en</language>
    <item>
      <title>JS Double Equals Vs Triple Equals	</title>
      <dc:creator>swolecoder</dc:creator>
      <pubDate>Mon, 01 Jun 2020 19:12:34 +0000</pubDate>
      <link>https://dev.to/swolecoder/js-double-equals-vs-triple-equals-239</link>
      <guid>https://dev.to/swolecoder/js-double-equals-vs-triple-equals-239</guid>
      <description>&lt;p&gt;&lt;strong&gt;Triple Equals &lt;/strong&gt;&lt;br&gt;
 It looks for both types and value&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; - Both Number and equal values
     2  === 2 // true

 -  Both String and equal values
    “Hello” === “Hello” // true 

 - Both booleans and equal values 
    true === true  //true 

 - Number Vs String

    43 === ’43’ //false

 - Different types ( Boolean Vs Number)

   false === 0 //false 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Double Equals &lt;/strong&gt;&lt;br&gt;
It just looks for value. Double does type coercion which means it tries to convert them into common type before comparing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   77 == ’77’ //true

   77 === ’77’ //false

   false === 0 //false

   false == 0 //true  
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Falsy Values Comparison:  &lt;/strong&gt;&lt;br&gt;
There are 6 falsy values in JS: false, 0, "", null, undefined and NaN &lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; false == 0 //true

 0 == “” // true

 “” == false //true

 null  == null //true

 undefined == undefined //true

 null == undefined // true  

 - Note: NaN is not equivalent to anything 


 NaN == NaN //false

 NaN == null //false
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
