<?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: Gouthami</title>
    <description>The latest articles on DEV Community by Gouthami (@gomigoku).</description>
    <link>https://dev.to/gomigoku</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%2F602979%2Fe83765aa-2083-41e2-9454-5e29d417fbfb.jpg</url>
      <title>DEV Community: Gouthami</title>
      <link>https://dev.to/gomigoku</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gomigoku"/>
    <language>en</language>
    <item>
      <title>Nullish Coalescing: Under 256 characters</title>
      <dc:creator>Gouthami</dc:creator>
      <pubDate>Tue, 18 Jun 2024 10:33:08 +0000</pubDate>
      <link>https://dev.to/gomigoku/nullish-coalescing-under-256-characters-47hg</link>
      <guid>https://dev.to/gomigoku/nullish-coalescing-under-256-characters-47hg</guid>
      <description>&lt;p&gt;This is a computer science under 256 characters challenge&lt;/p&gt;

&lt;p&gt;Nullish coalescing (&lt;code&gt;??&lt;/code&gt;) in JavaScript returns the right operand if the left operand is &lt;code&gt;null&lt;/code&gt; or &lt;code&gt;undefined&lt;/code&gt;; otherwise, it returns the left operand. &lt;br&gt;
Example: &lt;code&gt;let result = value ?? 'default';&lt;/code&gt; ensures &lt;code&gt;result&lt;/code&gt; gets &lt;code&gt;'default'&lt;/code&gt; only if &lt;code&gt;value&lt;/code&gt; is &lt;code&gt;null&lt;/code&gt; or &lt;code&gt;undefined&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>cschallenge</category>
      <category>computerscience</category>
      <category>devchallenge</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Truthy and Falsy Values</title>
      <dc:creator>Gouthami</dc:creator>
      <pubDate>Sun, 19 May 2024 09:28:24 +0000</pubDate>
      <link>https://dev.to/gomigoku/truthy-and-falsy-values-l3g</link>
      <guid>https://dev.to/gomigoku/truthy-and-falsy-values-l3g</guid>
      <description>&lt;p&gt;Yes! JavaScript is weird, interesting and very dynamic too. It has so many things that you will get tired of learning, if you are thinking of mastering  everything at one go.&lt;/p&gt;

&lt;p&gt;Today I am going to talk about something that I learned when I came across this topic. I might not go too depth on this, but I will tell you what you must know about these things.&lt;/p&gt;

&lt;p&gt;So we have Boolean &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt; values right? then why do we have this truthy and falsy values again to make a block of code to run or not to run and when exactly then come into picture?&lt;/p&gt;

&lt;p&gt;Sometimes what happens you know, you have written some expression which ultimately evaluates to boolean value that is either true or false in Boolean context, these values are called as &lt;code&gt;truthy&lt;/code&gt; and &lt;code&gt;falsy&lt;/code&gt; values.&lt;/p&gt;

&lt;p&gt;You don't have to particularly remember about the truthy values, just make of note of falsy values, rest all of them are considered as truthy values.&lt;/p&gt;

&lt;p&gt;Falsy values:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;  0&lt;/li&gt;
&lt;li&gt; -0&lt;/li&gt;
&lt;li&gt; '' (empty string)&lt;/li&gt;
&lt;li&gt; undefined&lt;/li&gt;
&lt;li&gt; null&lt;/li&gt;
&lt;li&gt; NaN&lt;/li&gt;
&lt;li&gt; 0n&lt;/li&gt;
&lt;li&gt; false&lt;/li&gt;
&lt;li&gt;document.all&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwrrwv6wnbhh32000m1kb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwrrwv6wnbhh32000m1kb.png" alt="Falsy Values" width="800" height="731"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anything other than these are truthy values. For example, empty array, empty object etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4z46cjpc3qg2oisoiv4t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4z46cjpc3qg2oisoiv4t.png" alt="Truthy Values" width="800" height="685"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So now you know how to check if a expression evaluates to truthy or falsy value so that the you can put a proper condition to manage your code.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5tpos5q30czyvpygnvxj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5tpos5q30czyvpygnvxj.png" alt="Truthy and falsy values in expression" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

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