<?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: Bhavy Ladani</title>
    <description>The latest articles on DEV Community by Bhavy Ladani (@bhavycodes).</description>
    <link>https://dev.to/bhavycodes</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%2F1258949%2Fdd217b83-af7d-483d-882c-69586baa9dec.jpg</url>
      <title>DEV Community: Bhavy Ladani</title>
      <link>https://dev.to/bhavycodes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bhavycodes"/>
    <language>en</language>
    <item>
      <title>🚀 CSR vs SSR in React: Why Your Website is Playing Hide and Seek</title>
      <dc:creator>Bhavy Ladani</dc:creator>
      <pubDate>Wed, 30 Jul 2025 16:40:44 +0000</pubDate>
      <link>https://dev.to/bhavycodes/csr-vs-ssr-in-react-why-your-website-is-playing-hide-and-seek-g84</link>
      <guid>https://dev.to/bhavycodes/csr-vs-ssr-in-react-why-your-website-is-playing-hide-and-seek-g84</guid>
      <description>&lt;p&gt;Ever clicked on a website and stared at a blank screen for what feels like forever, wondering if your internet just quit its job?&lt;/p&gt;

&lt;p&gt;Welcome to the wild world of CSR and SSR — or as I like to call it:&lt;br&gt;
👉 “Who builds the house — your browser or someone else?”&lt;/p&gt;

&lt;p&gt;Let’s break it down. No jargon. Just plain talk.&lt;/p&gt;

&lt;p&gt;🧠 First, What's Rendering?&lt;br&gt;
Imagine a website is like a restaurant.&lt;/p&gt;

&lt;p&gt;You order food (visit a page).&lt;/p&gt;

&lt;p&gt;The kitchen (backend or frontend) cooks it.&lt;/p&gt;

&lt;p&gt;Then it's served to you (you see the content).&lt;/p&gt;

&lt;p&gt;Now the real question is: Who’s doing the cooking?&lt;/p&gt;

&lt;p&gt;🍳 Client-Side Rendering (CSR): Your Browser, the Chef&lt;br&gt;
CSR means your browser is doing all the hard work.&lt;/p&gt;

&lt;p&gt;When you visit a website built with CSR (like most classic React apps), here’s what really happens:&lt;/p&gt;

&lt;p&gt;You get served a blank plate (an empty HTML page).&lt;/p&gt;

&lt;p&gt;Your browser goes, “Wait, let me cook!”&lt;/p&gt;

&lt;p&gt;It fetches a big bundle of JavaScript.&lt;/p&gt;

&lt;p&gt;That JavaScript runs and builds the actual content.&lt;/p&gt;

&lt;p&gt;Finally — poof! The page appears.&lt;/p&gt;

&lt;p&gt;🥴 But why?&lt;br&gt;
Because React (and other frameworks) love to control everything. It lets developers build fancy apps that feel smooth and interactive. Great for them. For you? You just wanted to read a blog.&lt;/p&gt;

&lt;p&gt;💥 The Catch&lt;br&gt;
Slow first load. You might be staring at a spinner longer than you'd like.&lt;/p&gt;

&lt;p&gt;Bad for SEO. Google bots aren’t great at waiting for JavaScript to do its thing (they're impatient like most of us).&lt;/p&gt;

&lt;p&gt;🧑‍🍳 Server-Side Rendering (SSR): Let the Server Do the Cooking&lt;br&gt;
SSR flips the script.&lt;/p&gt;

&lt;p&gt;When you visit a site using SSR (like with Next.js — React’s cool cousin), here’s the magic:&lt;/p&gt;

&lt;p&gt;You ask for the page.&lt;/p&gt;

&lt;p&gt;The server builds the page — like an overachieving waiter.&lt;/p&gt;

&lt;p&gt;You get a fully loaded plate of HTML content.&lt;/p&gt;

&lt;p&gt;Your browser just has to display it.&lt;/p&gt;

&lt;p&gt;✅ Benefits&lt;br&gt;
Faster first view. You see content instantly. No waiting for JavaScript marathons.&lt;/p&gt;

&lt;p&gt;Better for search engines. Google sees the actual content — not a skeleton screen.&lt;/p&gt;

&lt;p&gt;🤔 So Why Not Always Use SSR?&lt;br&gt;
Because... life is about tradeoffs. SSR:&lt;/p&gt;

&lt;p&gt;Can be slower when navigating between pages.&lt;/p&gt;

&lt;p&gt;Needs a server that stays awake (unlike free hosting that naps often).&lt;/p&gt;

&lt;p&gt;Might add complexity in code and infrastructure.&lt;/p&gt;

&lt;p&gt;🎭 The Big Drama: CSR vs SSR&lt;br&gt;
Feature CSR (Client-Side)   SSR (Server-Side)&lt;br&gt;
Initial Load    Slower  Faster&lt;br&gt;
SEO Not great   Much better&lt;br&gt;
Interactivity   Smooth after load   Can be just as good&lt;br&gt;
Server Needs    Just a static host  Needs a real server&lt;br&gt;
Developer Pain  Easier setup    Slightly more caffeine required&lt;/p&gt;

&lt;p&gt;🧑‍💻 In React World...&lt;br&gt;
React started with CSR. You’d create a React app (like with create-react-app), deploy it, and boom — CSR.&lt;/p&gt;

&lt;p&gt;But then Next.js came along and said:&lt;/p&gt;

&lt;p&gt;“Why not let the server do some work too?”&lt;br&gt;
(and maybe stop blaming the user's browser for everything...)&lt;/p&gt;

&lt;p&gt;So SSR became more popular in React world, especially for blogs, e-commerce, landing pages, and anything where people need to see stuff quickly (and Google needs to see it too).&lt;/p&gt;

&lt;p&gt;🧠 TL;DR (Too Lazy; Didn’t Read)&lt;br&gt;
CSR = your browser builds the page. Might take a second. Good for apps.&lt;/p&gt;

&lt;p&gt;SSR = the server builds the page. You see stuff faster. Great for SEO and content-heavy sites.&lt;/p&gt;

&lt;p&gt;🎯 Final Thought&lt;br&gt;
If CSR and SSR were roommates:&lt;/p&gt;

&lt;p&gt;CSR is the one who promises they’ll cook, but ends up ordering food after 45 mins of prep.&lt;/p&gt;

&lt;p&gt;SSR already cooked before you walked in. You just sit down and eat.&lt;/p&gt;

&lt;p&gt;Use the one that suits your project. And remember — nobody has to suffer through a blank screen if you architect your site right.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>Exploring Uncommon HTML tags</title>
      <dc:creator>Bhavy Ladani</dc:creator>
      <pubDate>Thu, 18 Jan 2024 06:00:42 +0000</pubDate>
      <link>https://dev.to/bhavycodes/exploring-uncommon-html-tags-2e9o</link>
      <guid>https://dev.to/bhavycodes/exploring-uncommon-html-tags-2e9o</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Welcome, fellow developers! In the vast landscape of web development, HTML stands as a cornerstone. While we're all familiar with the usual suspects like &lt;/p&gt; and &lt;p&gt;, there exists a trove of lesser-known HTML tags waiting to be explored. In this blog, we'll peel back the layers of HTML to reveal lesser-known tags that might just be the missing pieces in your development. So, let's start to see one by one.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;details&lt;/em&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;em&gt;summary&lt;/em&gt;&lt;/strong&gt; Tags:
&lt;/h2&gt;

&lt;p&gt;The  and  tags are perfect for creating interactive and collapsible content. Wrap your content inside the  tag, and use  to provide a brief overview or title. Users can then toggle the visibility of the enclosed content.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;details&amp;gt;
  &amp;lt;summary&amp;gt;Click to reveal more&amp;lt;/summary&amp;gt;
  &amp;lt;p&amp;gt;This is the hidden content you can reveal or hide.&amp;lt;/p&amp;gt;
&amp;lt;/details&amp;gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;mark&lt;/em&gt;&lt;/strong&gt; Tag:
&lt;/h2&gt;

&lt;p&gt;Highlighting text is a common requirement, and this tag serves this purpose. It allows you to visually emphasise specific parts of your content.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is a &amp;lt;mark&amp;gt;highlighted&amp;lt;/mark&amp;gt; text example.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;progress&lt;/em&gt;&lt;/strong&gt; Tag:
&lt;/h2&gt;

&lt;p&gt;Displaying progress bars is made easy with the  tag. It's especially useful when you want to indicate the completion status of a task.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;progress value="50" max="100"&amp;gt;50%&amp;lt;/progress&amp;gt;
&amp;lt;progress value="50" max="100"&amp;gt;70%&amp;lt;/progress&amp;gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;figcaption&lt;/em&gt;&lt;/strong&gt; Tag:
&lt;/h2&gt;

&lt;p&gt;Enhance the presentation of figures and images by using the  tag. It provides a space to add a caption directly associated with the figure.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
  &amp;lt;img src="image.jpg" alt="A beautiful image"&amp;gt;
  &amp;lt;figcaption&amp;gt;Caption describing the image&amp;lt;/figcaption&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;abbr&lt;/em&gt;&lt;/strong&gt; Tag:
&lt;/h2&gt;

&lt;p&gt;When using abbreviations or acronyms, the  tag helps by providing an expanded version when the user hovers over it.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;
    &amp;lt;abbr title="World Health Organisation"&amp;gt;
        WHO
    &amp;lt;/abbr&amp;gt; 
    plays a crucial role in global health.
&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;time&lt;/em&gt;&lt;/strong&gt; Tag:
&lt;/h2&gt;

&lt;p&gt;Representing dates and times in a structured manner is simplified with the &lt;time&gt; tag. It helps search engines and browsers understand the content better.&lt;br&gt;
&lt;/time&gt;&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;
    Join us on 
    &amp;lt;time datetime="2024-01-17"&amp;gt;
        January 17, 2024
    &amp;lt;/time&amp;gt; 
    for an exciting event.
&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;cite&lt;/em&gt;&lt;/strong&gt; Tag:
&lt;/h2&gt;

&lt;p&gt;When referencing the title of a creative work (e.g., a book, movie, or song) within your content, the &lt;cite&gt; tag provides semantic meaning and helps improve accessibility.&lt;br&gt;
&lt;/cite&gt;&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;blockquote&amp;gt;
  &amp;lt;p&amp;gt;In the words of Shakespeare, &amp;lt;cite&amp;gt;to be or not to be&amp;lt;/cite&amp;gt;.&amp;lt;/p&amp;gt;
&amp;lt;/blockquote&amp;gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;To wrap it up, remember: small tags, big impact. These lesser-known HTML tags may be simple, but their potential to enhance your web projects is anything but. Happy coding!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Magic of TypeScript Generics</title>
      <dc:creator>Bhavy Ladani</dc:creator>
      <pubDate>Thu, 18 Jan 2024 05:53:44 +0000</pubDate>
      <link>https://dev.to/bhavycodes/magic-of-typescript-generics-4j15</link>
      <guid>https://dev.to/bhavycodes/magic-of-typescript-generics-4j15</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Welcome, fellow developers, to the mystical realm of TypeScript Generics! 🚀 If you've ever felt the need to write code that dances gracefully across various data types without compromising on type safety, you're in for a treat. TypeScript Generics are like the spell-book of a code wizard, allowing you to conjure powerful, reusable, and type-safe components. Let me take you to the enchanting world of Generics!&lt;/p&gt;

&lt;h2&gt;
  
  
  Chapter 1: The Essence of Generics
&lt;/h2&gt;

&lt;p&gt;At the heart of TypeScript Generics is the ability to create functions that transcend the boundaries of data types. Imagine a function that echoes whatever you pass into it, regardless of its type. Behold, the identity function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function identity&amp;lt;T&amp;gt;(arg: T): T {
  return arg;
}

// Usage
let result = identity&amp;lt;string&amp;gt;("Hello, generics!");
console.log(result); // Output: Hello, generics!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Chapter 2: Generics Unleashed - Classes Edition
&lt;/h2&gt;

&lt;p&gt;Not just confined to functions, Generics can also spice up your classes. Meet the mysterious Box:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Box&amp;lt;T&amp;gt; {
  private value: T;

  constructor(value: T) {
    this.value = value;
  }

  getValue(): T {
    return this.value;
  }
}

// Usage
let numberBox = new Box&amp;lt;number&amp;gt;(42);
console.log(numberBox.getValue()); // Output: 42

let stringBox = new Box&amp;lt;string&amp;gt;("Generics are powerful!");
console.log(stringBox.getValue()); // Output: Generics are powerful!

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Box class is like a magical container, preserving the essence of its contents, no matter the type.&lt;/p&gt;

&lt;h2&gt;
  
  
  Chapter 3: Generics and Interfaces - A Harmonious Duo
&lt;/h2&gt;

&lt;p&gt;Interfaces, too, can dance with Generics in perfect harmony. Behold the majestic Pair:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;interface Pair&amp;lt;T, U&amp;gt; {
  first: T;
  second: U;
}

// Usage
let pair: Pair&amp;lt;number, string&amp;gt; = { first: 1, second: "two" };
console.log(pair.first); // Output: 1
console.log(pair.second); // Output: two
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A Pair of Generics, creating a bond between two different types - the Romeo and Juliet of TypeScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  Chapter 4: Constraints - Taming the Generics Beast
&lt;/h2&gt;

&lt;p&gt;Sometimes, you need a bit of control over your generic types. Enter constraints, the noble knights of type safety:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;interface Lengthwise {
  length: number;
}

function logLength&amp;lt;T extends Lengthwise&amp;gt;(arg: T): void {
  console.log(arg.length);
}

// Usage
logLength("Hello"); // Output: 5
logLength([1, 2, 3]); // Output: 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Lengthwise interface is like a magic circle, ensuring that only objects with a length property can step inside.&lt;/p&gt;

&lt;h2&gt;
  
  
  Chapter 5: Default Values - When Generics Get Lazy
&lt;/h2&gt;

&lt;p&gt;Generics can also be a bit lazy. This is one of my favourite among all. Just &lt;strong&gt;set a default value&lt;/strong&gt;, and let TypeScript do the work:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function identity&amp;lt;T = string&amp;gt;(arg: T): T {
  return arg;
}

// Usage
let result = identity("Hello, generics!");
console.log(result); // Output: Hello, generics!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No need to shout the type every time; TypeScript's got it covered.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Remember this: Generics are your magical companions, ready to adapt to any type and make your code more versatile than a chameleon at a colour factory. Embrace the power, wield it wisely, and let the enchantment of Generics elevate your coding spells to new heights! Happy coding, wizards! See you on the next one. Do follow if you have learned something new. 🪄✨&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>typescript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Decoding Weird JavaScript Behaviour</title>
      <dc:creator>Bhavy Ladani</dc:creator>
      <pubDate>Wed, 17 Jan 2024 10:45:05 +0000</pubDate>
      <link>https://dev.to/bhavycodes/decoding-weird-javascript-behaviour-3e43</link>
      <guid>https://dev.to/bhavycodes/decoding-weird-javascript-behaviour-3e43</guid>
      <description>&lt;h2&gt;
  
  
  History
&lt;/h2&gt;

&lt;p&gt;JavaScript was created by Brendan Eich in 1995 while he was working at Netscape.&lt;/p&gt;

&lt;p&gt;The initial version of JavaScript was developed in just 10 days in May 1995.&lt;/p&gt;

&lt;p&gt;Browsers primarily understand and interpret three core languages for web development: HTML, CSS &amp;amp; JavaScript (not even TypeScript 🙂).&lt;/p&gt;

&lt;p&gt;JavaScript is a versatile programming language used both on the client side and increasingly on the server side (Node JS).&lt;/p&gt;

&lt;p&gt;He is also the founder of two famous browsers: Mozilla Firefox and Brave.&lt;/p&gt;

&lt;h2&gt;
  
  
  Type Coercion
&lt;/h2&gt;

&lt;p&gt;One of the most common sources of weird behaviour in JavaScript is type coercion.&lt;/p&gt;

&lt;p&gt;Coercion in simple terms is the process of automatically converting values from one type to another type.&lt;/p&gt;

&lt;p&gt;This is one of the reasons why “type” is important.&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%2F2fnr6ns95g23c8i9lfr0.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%2F2fnr6ns95g23c8i9lfr0.png" alt="Type-Coercion" width="800" height="966"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Floating Point Numbers
&lt;/h2&gt;

&lt;p&gt;Floating-point numbers are used to represent decimal numbers in JavaScript.&lt;/p&gt;

&lt;p&gt;They have limited precision due to their fixed bit-size (64 bits in JS).&lt;/p&gt;

&lt;p&gt;Solutions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use a library like Decimal.js for precise calculations.&lt;/li&gt;
&lt;li&gt;Use the toFixed() method to round floating-point numbers to a certain number of decimal places.&lt;/li&gt;
&lt;/ul&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%2Fyod58pt8z9ymhfyaqrp0.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%2Fyod58pt8z9ymhfyaqrp0.png" alt="Floating-Point-Numbers" width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Equality
&lt;/h2&gt;

&lt;p&gt;JavaScript has two equality operators right now: == and ===.&lt;/p&gt;

&lt;p&gt;The == operator checks for equality regardless of type, while the === operator checks for equality and type.&lt;/p&gt;

&lt;p&gt;To avoid these unexpected results, you should always use the === operator when comparing values.&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%2F8md76ycven391zs2dcdg.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%2F8md76ycven391zs2dcdg.png" alt="Equality" width="800" height="636"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  undefined vs. null
&lt;/h2&gt;

&lt;p&gt;Undefined: It represents a variable that has been declared but not assigned a value.&lt;/p&gt;

&lt;p&gt;Null: It represents an intentional absence of any object value.&lt;/p&gt;

&lt;p&gt;The == operator treats undefined and null as equal, but the === operator does not.&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%2Fjjrxhix09aeej26asbsf.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%2Fjjrxhix09aeej26asbsf.png" alt="Undefined-null" width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  NaN
&lt;/h2&gt;

&lt;p&gt;NaN stands for "Not a Number"&lt;/p&gt;

&lt;p&gt;It is a special value that represents an invalid numerical value.&lt;/p&gt;

&lt;p&gt;The isNaN() function in JavaScript is used to check if a value is NaN&lt;/p&gt;

&lt;p&gt;In PHP, you have the is_nan() function to check if a value is NaN.&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%2F7x90ohhjno4pmwldhdcm.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%2F7x90ohhjno4pmwldhdcm.png" alt="nan" width="800" height="737"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it for this article. I hope you must have learnt something new from this article or may be now you know the reason behind the weird behaviour of JavaScript. I will also make part 2 of this very soon. So stay tuned. Thank you.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
