<?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: vidhya murali</title>
    <description>The latest articles on DEV Community by vidhya murali (@vidhya_murali_5aabe7784bd).</description>
    <link>https://dev.to/vidhya_murali_5aabe7784bd</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%2F3924225%2Fe7e20af2-0747-45fc-aa5b-4858d0aacc25.png</url>
      <title>DEV Community: vidhya murali</title>
      <link>https://dev.to/vidhya_murali_5aabe7784bd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vidhya_murali_5aabe7784bd"/>
    <language>en</language>
    <item>
      <title>JavaScript Booleans</title>
      <dc:creator>vidhya murali</dc:creator>
      <pubDate>Thu, 04 Jun 2026 05:41:01 +0000</pubDate>
      <link>https://dev.to/vidhya_murali_5aabe7784bd/javascript-booleans-5a0n</link>
      <guid>https://dev.to/vidhya_murali_5aabe7784bd/javascript-booleans-5a0n</guid>
      <description>&lt;p&gt;&lt;strong&gt;The Boolean Data Type&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, a Boolean is a primitive data type that can only have one of two values:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;true&lt;/strong&gt; or &lt;strong&gt;false&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Boolean value of an expression is the basis for all JavaScript comparisons and conditions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Boolean Characteristics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;true and false are boolean data types&lt;/li&gt;
&lt;li&gt;true and false are the only possible boolean values&lt;/li&gt;
&lt;li&gt;true and false must be written in lowercase&lt;/li&gt;
&lt;li&gt;true and false must be written without quotes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Boolean Use Cases&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Very often, in programming, you will need a data type that can represent one of two values, like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;yes or no&lt;/li&gt;
&lt;li&gt;on or off&lt;/li&gt;
&lt;li&gt;true or false&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Boolean values are fundamental for logical operations and control flow in JavaScript programming.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Comparisons&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All JavaScript comparison operators (like ==, !=, &amp;lt;, &amp;gt;) return true or false from the comparison.&lt;/p&gt;

&lt;p&gt;Given that x = 5, the table below explains comparison:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ud0n8qnxbdan6yhya5y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ud0n8qnxbdan6yhya5y.png" alt=" " width="797" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loops&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Booleans are extensively used in loops to determine conditions for looping.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs6zxmyjuczrica8xvg49.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs6zxmyjuczrica8xvg49.png" alt=" " width="706" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Boolean() Function&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use the Boolean() function to find out if an expression (or a variable) is true:&lt;/p&gt;

&lt;p&gt;Example : Boolean(10 &amp;gt; 9)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Everything With a "Value" is True&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmriilh475ldjh0k11nr9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmriilh475ldjh0k11nr9.png" alt=" " width="479" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In JavaScript, both an empty array [ ] and an empty object { } are truthy because they are objects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All objects in JavaScript evaluate to true in a boolean context, regardless of their content.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6t8wnk2qg48lnb3nb49j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6t8wnk2qg48lnb3nb49j.png" alt=" " width="531" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Boolean value of &lt;strong&gt;"" (empty string)&lt;/strong&gt; is false:&lt;/p&gt;

&lt;p&gt;let x = "";&lt;br&gt;
Boolean(x);&lt;/p&gt;

&lt;p&gt;The Boolean value of &lt;strong&gt;-0 (minus zero)&lt;/strong&gt; is false:&lt;/p&gt;

&lt;p&gt;let x = -0;&lt;br&gt;
Boolean(x);&lt;/p&gt;

&lt;p&gt;The Boolean value of &lt;strong&gt;undefined&lt;/strong&gt; is false:&lt;/p&gt;

&lt;p&gt;let x;&lt;br&gt;
Boolean(x);&lt;/p&gt;

&lt;p&gt;The Boolean value of null is false:&lt;/p&gt;

&lt;p&gt;let x = null;&lt;br&gt;
Boolean(x);&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Booleans as Objects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Normally JavaScript booleans are primitive values created from literals:&lt;/p&gt;

&lt;p&gt;let x = false;&lt;/p&gt;

&lt;p&gt;But booleans can also be defined as objects with the keyword new:&lt;/p&gt;

&lt;p&gt;let y = new Boolean(false);&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3j2wgywrmixe8997vapr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3j2wgywrmixe8997vapr.png" alt=" " width="501" height="201"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fw612yl8gybtaotknnu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fw612yl8gybtaotknnu.png" alt=" " width="320" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, &lt;strong&gt;truthy **and **falsy&lt;/strong&gt; values are concepts related to boolean evaluation. Every value in JavaScript has an inherent boolean "truthiness" or "falsiness," which means they can be implicitly evaluated to true or false in boolean contexts, such as in conditional statements or logical operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Are Truthy Values?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Truthy values are values that are evaluated to be true when used in a Boolean context. Simply put, any value that is not explicitly falsy is considered truthy&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Non-zero numbers: 42, -1, 3.14&lt;/li&gt;
&lt;li&gt;Non-empty strings: "hello", "0", " "&lt;/li&gt;
&lt;li&gt;Objects and arrays: {}, []&lt;/li&gt;
&lt;li&gt;Functions: function() {}&lt;/li&gt;
&lt;li&gt;Dates: new Date()&lt;/li&gt;
&lt;li&gt;Symbols: Symbol()&lt;/li&gt;
&lt;li&gt;BigInt values other than 0n: 10n&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What Are Falsy Values?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Falsy values are values that evaluate to false when used in a Boolean. JavaScript has a fixed list of falsy values&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;false&lt;/li&gt;
&lt;li&gt;0 (and -0)&lt;/li&gt;
&lt;li&gt;0n (BigInt zero)&lt;/li&gt;
&lt;li&gt;"" (empty string)&lt;/li&gt;
&lt;li&gt;null&lt;/li&gt;
&lt;li&gt;undefined&lt;/li&gt;
&lt;li&gt;NaN&lt;/li&gt;
&lt;li&gt;document.all (used for backward compatibility&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fduott3m3ckkclo7avll7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fduott3m3ckkclo7avll7.png" alt=" " width="752" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft8q0fvp7l1ij8mdgdvr9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft8q0fvp7l1ij8mdgdvr9.png" alt=" " width="681" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fulg79xs3rme8brl3bw57.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fulg79xs3rme8brl3bw57.png" alt=" " width="711" height="536"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Do not create Boolean objects.&lt;/p&gt;

&lt;p&gt;The new keyword complicates the code and slows down execution speed.&lt;/p&gt;

&lt;p&gt;Boolean objects can produce unexpected results:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ciw3ryu4t65i6d7ljqk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ciw3ryu4t65i6d7ljqk.png" alt=" " width="573" height="188"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reference :&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://www.w3schools.com/js/js_booleans.asp" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;w3schools.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>javascript</category>
      <category>ai</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Conditional Statements in JavaScript</title>
      <dc:creator>vidhya murali</dc:creator>
      <pubDate>Thu, 04 Jun 2026 05:19:57 +0000</pubDate>
      <link>https://dev.to/vidhya_murali_5aabe7784bd/conditional-statements-in-javascript-49g0</link>
      <guid>https://dev.to/vidhya_murali_5aabe7784bd/conditional-statements-in-javascript-49g0</guid>
      <description>&lt;p&gt;&lt;strong&gt;Conditional Statements&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Conditional Statements allow us to perform different actions for different conditions.&lt;/li&gt;
&lt;li&gt;Conditional statements run different code depending on true or false conditions
.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Conditional statements include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;if&lt;/li&gt;
&lt;li&gt;if...else&lt;/li&gt;
&lt;li&gt;if...else if...else&lt;/li&gt;
&lt;li&gt;switch&lt;/li&gt;
&lt;li&gt;ternary (? :)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When to use Conditionals&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;if&lt;/strong&gt; to specify a code block to be executed, if a specified condition is true&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;else&lt;/strong&gt; to specify a code block to be executed, if the same condition is false&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;else if&lt;/strong&gt; to specify a new condition to test, if the first condition is false&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;switch&lt;/strong&gt; to specify many alternative code blocks to be executed&lt;/li&gt;
&lt;li&gt;Use (? :) (ternary) as a shorthand for if...else&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The JavaScript if Statement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use the JavaScript if statement to execute a block of code when a condition is true.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0u4md1yu4o1pv97z36r8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0u4md1yu4o1pv97z36r8.png" alt=" " width="625" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpyv51fhttica972bw4i9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpyv51fhttica972bw4i9.png" alt=" " width="553" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nested if&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use an if statement inside another if statement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbtiqhf221475dcines8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbtiqhf221475dcines8.png" alt=" " width="603" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nested if statements can make your code more complex.&lt;/p&gt;

&lt;p&gt;A better solution is to use the &lt;strong&gt;logical AND operator&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftwtaj7p0nszpxehe476c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftwtaj7p0nszpxehe476c.png" alt=" " width="519" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The else Statement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use the else statement to specify a block of code to be executed if a condition is false.&lt;/p&gt;

&lt;p&gt;Syntax : &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcv2i2xyjb9e9gc24g96f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcv2i2xyjb9e9gc24g96f.png" alt=" " width="534" height="126"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff4txdtrqwyvm4oki859m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff4txdtrqwyvm4oki859m.png" alt=" " width="653" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The else if Statement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use the else if statement to specify a new condition if the first is false&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft6iiw11bw1l9mdm7uoxh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft6iiw11bw1l9mdm7uoxh.png" alt=" " width="735" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;The JavaScript Ternary Operator&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The conditional operator is a shorthand for writing conditional if...else statements.&lt;/p&gt;

&lt;p&gt;It is called a ternary operator because it takes three operands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3a4mou25nl1pi5y6ox8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3a4mou25nl1pi5y6ox8.png" alt=" " width="495" height="112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0pdec1zad1y158fp8apk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0pdec1zad1y158fp8apk.png" alt=" " width="638" height="154"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4b56q33egudju83jvzhf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4b56q33egudju83jvzhf.png" alt=" " width="697" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The conditional (ternary) operator is the only JavaScript operator that takes three operands.&lt;/p&gt;

&lt;p&gt;Reference :&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://www.w3schools.com/js/js_if.asp" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;w3schools.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
    <item>
      <title>Operators In JavaScript</title>
      <dc:creator>vidhya murali</dc:creator>
      <pubDate>Wed, 03 Jun 2026 08:12:33 +0000</pubDate>
      <link>https://dev.to/vidhya_murali_5aabe7784bd/operators-in-javascript-50f8</link>
      <guid>https://dev.to/vidhya_murali_5aabe7784bd/operators-in-javascript-50f8</guid>
      <description>&lt;p&gt;&lt;strong&gt;Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript operators are symbols used to perform operations on values and variables&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6c8knedsybsfq7d3p58b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6c8knedsybsfq7d3p58b.png" alt=" " width="681" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Types of JavaScript Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are different types of JavaScript operators:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Arithmetic Operators&lt;/li&gt;
&lt;li&gt;Assignment Operators&lt;/li&gt;
&lt;li&gt;Comparison Operators&lt;/li&gt;
&lt;li&gt;Logical Operators
And more ...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Arithmetic Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Arithmetic operators perform arithmetic on numbers (literals or variables&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnfjln3m9fi2drlbo5aj6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnfjln3m9fi2drlbo5aj6.png" alt=" " width="500" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Arithmetic Operations&lt;/strong&gt;&lt;br&gt;
A typical arithmetic operation operates on two numbers.&lt;/p&gt;

&lt;p&gt;The two numbers can be literals:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F98n4fvdkqyv8bi3noqay.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F98n4fvdkqyv8bi3noqay.png" alt=" " width="460" height="84"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Operators and Operands&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The numbers (in an arithmetic operation) are called operands.&lt;br&gt;
The operation (to be performed between the two operands) is defined by an operator.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Adding&lt;/strong&gt;&lt;br&gt;
The addition operator (+) adds numbers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr6txgf2x8055r43ma5c3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr6txgf2x8055r43ma5c3.png" alt=" " width="638" height="152"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Subtracting&lt;/strong&gt;&lt;br&gt;
The subtraction operator (-) subtracts numbers&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0tub55jwkrlrb40yga4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0tub55jwkrlrb40yga4.png" alt=" " width="618" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiplying&lt;/strong&gt;&lt;br&gt;
The multiplication operator (*) multiplies numbers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhw3d1ce204gofdsym352.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhw3d1ce204gofdsym352.png" alt=" " width="551" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dividing&lt;/strong&gt;&lt;br&gt;
The division operator (/) divides numbers&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqzgh1btg7vke7qc9oo4p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqzgh1btg7vke7qc9oo4p.png" alt=" " width="489" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remainder&lt;/strong&gt;&lt;br&gt;
The modulus operator (%) returns the division remainder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fku4t72fga3ntz369adj5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fku4t72fga3ntz369adj5.png" alt=" " width="566" height="136"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbg3kwvksuds5hgxv9uzl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbg3kwvksuds5hgxv9uzl.png" alt=" " width="743" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Incrementing&lt;/strong&gt;&lt;br&gt;
The increment operator (++) increments numbers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx0xbm3ed0a6c8sd9fa07.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx0xbm3ed0a6c8sd9fa07.png" alt=" " width="472" height="131"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decrementing&lt;/strong&gt;&lt;br&gt;
The decrement operator (--) decrements numbers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgc6qs1ejie98ygqqkomt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgc6qs1ejie98ygqqkomt.png" alt=" " width="483" height="143"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exponentiation&lt;/strong&gt;&lt;br&gt;
The exponentiation operator (**) raises the first operand to the power of the second operand.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh30pmqsvijgpwxq4dpgc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh30pmqsvijgpwxq4dpgc.png" alt=" " width="436" height="120"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[x ** y produces the same result as Math.pow(x,y)]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Operator Precedence&lt;/strong&gt;&lt;br&gt;
Operator precedence describes the order in which operations are performed in an arithmetic expression.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Assignment Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Assignment operators assign values to JavaScript variables.&lt;/p&gt;

&lt;p&gt;Given that x = 10 and y = 5, the table below explains the assignment operators:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F52b7wskkiwiywmvrpr79.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F52b7wskkiwiywmvrpr79.png" alt=" " width="756" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Logical Assignment Operators&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;The += Operator&lt;/strong&gt;&lt;br&gt;
The Addition Assignment Operator adds a value to a variable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F56doory3oav6uthfcjpg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F56doory3oav6uthfcjpg.png" alt=" " width="458" height="111"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The -= Operator&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Subtraction Assignment Operator subtracts a value from a variable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbeg2d71703nrwsf2qoq1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbeg2d71703nrwsf2qoq1.png" alt=" " width="500" height="106"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The &amp;amp;&amp;amp;= Operator&lt;/strong&gt;&lt;br&gt;
The Logical AND assignment operator is used between two values.&lt;/p&gt;

&lt;p&gt;If the first value is true, the second value is assigned&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz89c0t49ne4w454yjlj7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz89c0t49ne4w454yjlj7.png" alt=" " width="543" height="111"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk84tgfon6erqwv6jcidk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk84tgfon6erqwv6jcidk.png" alt=" " width="472" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Comparison Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Comparison operators are used to compare two values.&lt;/p&gt;

&lt;p&gt;Comparison operators always return true or false.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3xp4mglkxbzyk9dvgv4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3xp4mglkxbzyk9dvgv4.png" alt=" " width="780" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjvmtaq092nmvug0gsjz4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjvmtaq092nmvug0gsjz4.png" alt=" " width="787" height="125"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript String Comparison&lt;/strong&gt;&lt;br&gt;
Note that strings are compared alphabetically:&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9soxfp1hgsuan7b9rijx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9soxfp1hgsuan7b9rijx.png" alt=" " width="671" height="147"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkewjp0yw8re36e727ppv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkewjp0yw8re36e727ppv.png" alt=" " width="715" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ternary Operator (? :)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use (? :) (ternary) as a shorthand for if...else.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvdt0isyoy24zf0wt1md3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvdt0isyoy24zf0wt1md3.png" alt=" " width="357" height="107"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Febcimwxwdsq7gmga7yd3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Febcimwxwdsq7gmga7yd3.png" alt=" " width="649" height="133"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>frontend</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Type Conversion &amp; Type Coercion in JavaScript</title>
      <dc:creator>vidhya murali</dc:creator>
      <pubDate>Tue, 02 Jun 2026 05:36:39 +0000</pubDate>
      <link>https://dev.to/vidhya_murali_5aabe7784bd/type-conversion-type-coercion-in-javascript-1cm5</link>
      <guid>https://dev.to/vidhya_murali_5aabe7784bd/type-conversion-type-coercion-in-javascript-1cm5</guid>
      <description>&lt;p&gt;&lt;strong&gt;JavaScript Type Conversion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript Type Conversion can be defined as converting the data type of the variables from one type to the other manually by the programmer(explicitly) or automatically by the JavaScript(implicitly).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implicit Type Conversion (Coercion): Implicit Type Conversion occurs automatically by the JavaScript.&lt;/li&gt;
&lt;li&gt;Explicit Type Conversion: Explicit Type Conversion occurs when the programmer manually changes the type of the variables using the function Number(), String(), and Boolean().&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Implicit Type Conversion (Coercion)&lt;/strong&gt;&lt;br&gt;
In JavaScript, the implicit type conversion or coercion conversion can be defined as the automatic conversion of the data type of the variables from one type to another type. Implicit type conversion mostly occurs when we are performing the arithmetic or the logical operations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coercion is implicit (handled automatically by the engine), while type conversion is explicit (you manually use functions like Number() or String()).&lt;/li&gt;
&lt;li&gt;Because JavaScript is weakly typed, it doesn't throw errors when types don't match; it just tries to coerce them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;[Type coercion happens when you perform an operation on different data types, and the JavaScript engine tries to make them "fit" together.]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;String with Number (Concatenation)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When we add a string with the number, the JavaScript automatically converts the number into a string and performs string concatenation.&lt;/p&gt;

&lt;p&gt;let res= "15"+5;&lt;br&gt;
console.log(res);    [The output will be 20.]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Boolean to Number&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When we perform the mathematical operations, then JavaScript automatically converts true to 1 and false to 0.&lt;/li&gt;
&lt;li&gt;Values are coerced to booleans in logical contexts like if statements or using the double-NOT operator (!!).&lt;/li&gt;
&lt;li&gt;Falsy values: 0, "", null, undefined, NaN, and false.&lt;/li&gt;
&lt;li&gt;Truthy values: Everything else (including empty objects {} and arrays []).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9fj9a4ep66zxyr1sjnfh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9fj9a4ep66zxyr1sjnfh.png" alt=" " width="481" height="76"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Equality Comparison (==)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When we use the equality operator in the JavaScript, it compares them after converting the value into the same data type.&lt;br&gt;
[Use === (Strict Equality): This checks both value and type without coercion, preventing weird results.]&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9kyxf0vk1mei6vv3fo00.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9kyxf0vk1mei6vv3fo00.png" alt=" " width="297" height="63"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automatic Conversion in Logical Operations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, these values are automatically converts undefined, null, "" (empty string), false, NaN, and 0 to false, and all other values to true.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgevgze1gwuli8duzmu29.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgevgze1gwuli8duzmu29.png" alt=" " width="474" height="123"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explicit Type Conversion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, explicit type conversion can be defined as when we manually change the data type of the variable from one to other using some built-in JavaScript functions. JavaScript provides us the built-in functions for performing the explicit conversion.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Converting Strings to Numbers&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The global method Number() converts a variable (or a value) into a number.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A numeric string (like "3.14") converts to a number (like 3.14).&lt;/li&gt;
&lt;li&gt;An empty string (like "") converts to 0.&lt;/li&gt;
&lt;li&gt;A non numeric string (like "John") converts to NaN (Not a Number).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk9auoclj9v7zmuz088h5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk9auoclj9v7zmuz088h5.png" alt=" " width="183" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Converting Numbers to Strings&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The global method String() can convert numbers to strings.
It can be used on any type of numbers, literals, variables, or expressions:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdtcht7cuvzw6vdks3fxs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdtcht7cuvzw6vdks3fxs.png" alt=" " width="678" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Converting to Boolean&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, we can convert the value into a boolean we can use the Boolean() function&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fm9xl7fnvdj7z2693ch.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fm9xl7fnvdj7z2693ch.png" alt=" " width="274" height="155"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reasons to Learn JavaScript Type Conversion&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data Handling&lt;/strong&gt;: In JavaScript when we are working with API responses, user inputs and calculations, these type of the operation require type conversion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prevent Bugs&lt;/strong&gt;: It is important to understand the type conversion which can help in preventing bugs which occurs when JavaScript implicitly converts value.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Clarity&lt;/strong&gt;: By performing the explicit conversion makes our code bug free and more clear.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhw61pqyqa5za0v9ixl1s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhw61pqyqa5za0v9ixl1s.png" alt=" " width="709" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Data Types in JavaScript</title>
      <dc:creator>vidhya murali</dc:creator>
      <pubDate>Mon, 01 Jun 2026 06:22:34 +0000</pubDate>
      <link>https://dev.to/vidhya_murali_5aabe7784bd/data-types-in-javascript-3g55</link>
      <guid>https://dev.to/vidhya_murali_5aabe7784bd/data-types-in-javascript-3g55</guid>
      <description>&lt;p&gt;&lt;strong&gt;Data Types In Javascript&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Data Type - A "&lt;em&gt;data type&lt;/em&gt;" is an attribute that specifies the size, range, and type of values that a variable can store&lt;/p&gt;

&lt;p&gt;The ECMAScript standard defines eight built-in data types in JavaScript. These are split into two categories: seven primitive types (immutable, single values) and one non-primitive type (mutable collections)&lt;/p&gt;

&lt;p&gt;[ mutable values can be modified in place after creation, while immutable values cannot be altered once created ]&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnhcdazp6wws8i1d6nps2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnhcdazp6wws8i1d6nps2.png" alt=" " width="591" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7mx2caan8851ztyvcsb6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7mx2caan8851ztyvcsb6.png" alt=" " width="557" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Examples :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1gqd2dfj04xr2c76sbav.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1gqd2dfj04xr2c76sbav.png" alt=" " width="388" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvuyovyj3bdyqv0trqoz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvuyovyj3bdyqv0trqoz.png" alt=" " width="518" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Concept of Data Types&lt;/strong&gt;&lt;br&gt;
In programming, data types is an important concept.&lt;/p&gt;

&lt;p&gt;To be able to operate on variables, it is important to know something about the type.&lt;/p&gt;

&lt;p&gt;Without data types, a computer cannot safely solve this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ei2nwqykewyuiup8bzf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ei2nwqykewyuiup8bzf.png" alt=" " width="193" height="39"&gt;&lt;/a&gt;&lt;br&gt;
Does it make any sense to add "Volvo" to sixteen? Will it produce an error or will it produce a result?&lt;/p&gt;

&lt;p&gt;JavaScript will treat the example above as:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2it8j7atabfyhc98q0pt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2it8j7atabfyhc98q0pt.png" alt=" " width="253" height="38"&gt;&lt;/a&gt;&lt;br&gt;
[  When adding a number and a string, JavaScript will treat the number as a string. ]&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj1w85i09xyrs6fhh39hd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj1w85i09xyrs6fhh39hd.png" alt=" " width="785" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv5w94k278ro6emb4drsg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv5w94k278ro6emb4drsg.png" alt=" " width="338" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>frontend</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Javascript Variables</title>
      <dc:creator>vidhya murali</dc:creator>
      <pubDate>Mon, 01 Jun 2026 06:00:41 +0000</pubDate>
      <link>https://dev.to/vidhya_murali_5aabe7784bd/javascript-variables-3e0g</link>
      <guid>https://dev.to/vidhya_murali_5aabe7784bd/javascript-variables-3e0g</guid>
      <description>&lt;p&gt;Hi, Let's Learn Variables in Javascript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variable&lt;/strong&gt;[Variables = Data Containers]&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A JavaScript variable is a named container used to store, reference, and manipulate data values in a program. Because JavaScript is dynamically typed, you do not need to specify the type of data (like text or numbers) when creating a variable; the engine determines it automatically at runtime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Variables are identified with unique names called identifiers.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ex : a=10 ---&amp;gt; a- variable , 10- value&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F600wd394ynz9ul83v6s1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F600wd394ynz9ul83v6s1.png" alt=" " width="557" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The rules for constructing names (identifiers) are:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Names can contain letters, digits, underscores, and dollar signs.&lt;/li&gt;
&lt;li&gt;Names must begin with a letter, a $ sign or an underscore     (_).Numbers are not allowed as the first character in names.&lt;/li&gt;
&lt;li&gt;Names are case sensitive (X is different from x).&lt;/li&gt;
&lt;li&gt;Reserved words (JavaScript keywords) cannot be used as names.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fep5m2592kdpm6bvlzqij.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fep5m2592kdpm6bvlzqij.png" alt=" " width="325" height="126"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi5nvsrbc3eic3gj8sfy3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi5nvsrbc3eic3gj8sfy3.png" alt=" " width="251" height="75"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dynamically Typed vs Statically Typed Languages&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Statically Typed Languages&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How it works: Variable data types are known and enforced before the program runs (at compile time).&lt;/li&gt;
&lt;li&gt;Key traits: You must declare types explicitly, and errors are caught early.&lt;/li&gt;
&lt;li&gt;Pros: More optimized, faster execution, fewer surprises in production.&lt;/li&gt;
&lt;li&gt;Examples: C, C++, Java, Rust, Go.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Dynamically Typed Languages&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How it works: Data types are assigned and checked during execution (at runtime).&lt;/li&gt;
&lt;li&gt;Key traits: You don't need to specify variable types, and values can change types freely.&lt;/li&gt;
&lt;li&gt;Pros: Faster setup, more flexible, and code is often quicker to write.&lt;/li&gt;
&lt;li&gt;Examples: Python, JavaScript, Ruby, PHP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ways to Declare Variables Modern JavaScript uses three primary keywords to create variables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;const&lt;/strong&gt;: Declares a block-scoped constant value that cannot be reassigned after initialization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;let&lt;/strong&gt;: Declares a block-scoped mutable variable that can be reassigned later.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;var&lt;/strong&gt;: Declares a function-scoped variable. This is an older legacy keyword that is mostly avoided in modern code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Variables are labels for data values.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Variables are containers for storing data.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>frontend</category>
    </item>
    <item>
      <title>JavaScript Day-1</title>
      <dc:creator>vidhya murali</dc:creator>
      <pubDate>Mon, 01 Jun 2026 05:50:05 +0000</pubDate>
      <link>https://dev.to/vidhya_murali_5aabe7784bd/javascript-day-1-3i64</link>
      <guid>https://dev.to/vidhya_murali_5aabe7784bd/javascript-day-1-3i64</guid>
      <description>&lt;p&gt;What I learned Today in JavaScript,Let's learn Together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1, JavaScript&lt;/strong&gt;&lt;br&gt;
JavaScript (JS) is a high-level, dynamic, and multi-paradigm programming language primarily used to create interactive and dynamic content on the web. It serves as one of the core technologies of the World Wide Web, working alongside HTML (which defines the structure) and CSS (which handles the layout and styling) to bring static web pages to life.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Core Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Interpreted &amp;amp; JIT Compiled: Browsers receive the code as plain text and execute it line-by-line using a built-in interpreter. Modern engines use just-in-time (JIT) compilation to transform code into a faster binary format during runtime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dynamically Typed: Variable types are determined automatically at runtime rather than being declared explicitly in the code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Single-Threaded &amp;amp; Asynchronous: It executes one task at a time on a single main thread, but uses an event loop to handle asynchronous tasks like fetching data without freezing the user interface.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multi-Paradigm: It supports object-oriented, functional, imperative, and procedural programming styles&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;JS interacts with the Document Object Model (DOM) to update website content in real time.&lt;/p&gt;

&lt;p&gt;Common use cases include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding Interactivity: Powering dropdown menus, image carousels, popup windows, and zoomable maps.&lt;/li&gt;
&lt;li&gt;Form Validation: Checking user inputs like email formats or credit card numbers before data is submitted to a server.&lt;/li&gt;
&lt;li&gt;Dynamic UI Updates: Refreshing content (such as social media feeds or instant message updates) automatically without requiring a full manual page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scripting Language&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A scripting language is a specific type of programming language used to automate tasks, control existing software applications, and generate dynamic content without requiring a distinct compilation step. &lt;/li&gt;
&lt;li&gt;Unlike traditional compiled languages, scripting languages are &lt;em&gt;interpreted line-by-line at runtime by another program&lt;/em&gt; known as an interpreter. All scripting languages are programming languages, but not all programming languages are scripting languages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Programming Languages&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;[Programming is telling a computer what to do.]&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A programming language is how we write code, what keywords we use, to tell the computer what to do.&lt;/li&gt;
&lt;li&gt;Different programming languages are used for different purposes, like JavaScript is good for web development, Python is good for AI, and C/C++ is good for programming microcontrollers.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Media Queries</title>
      <dc:creator>vidhya murali</dc:creator>
      <pubDate>Wed, 27 May 2026 04:52:11 +0000</pubDate>
      <link>https://dev.to/vidhya_murali_5aabe7784bd/media-queries-4kp2</link>
      <guid>https://dev.to/vidhya_murali_5aabe7784bd/media-queries-4kp2</guid>
      <description>&lt;p&gt;&lt;strong&gt;CSS Media Queries&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS media queries allow you to apply styles based on the characteristics of a device or the environment displaying the web page.&lt;/li&gt;
&lt;li&gt;CSS media queries are essential for creating responsive web pages&lt;/li&gt;
&lt;li&gt;The CSS &lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; rule is used to add media queries to your style sheet.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbaz9v2ma9w6dvpfv0j12.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbaz9v2ma9w6dvpfv0j12.png" alt=" " width="414" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj5uzvpx4ybw6eapz4n5e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj5uzvpx4ybw6eapz4n5e.png" alt=" " width="596" height="329"&gt;&lt;/a&gt;&lt;br&gt;
**&lt;br&gt;
Media Queries for Screen Orientation**&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Media queries can also be used to change the layout of a page depending on the orientation of the screen.
Here, we change the background-color of the body, if the screen orientation is in landscape mode:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv6uqx1ot43xb97zut0kr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv6uqx1ot43xb97zut0kr.png" alt=" " width="411" height="182"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>JavaScript Interview Questions</title>
      <dc:creator>vidhya murali</dc:creator>
      <pubDate>Wed, 27 May 2026 03:36:25 +0000</pubDate>
      <link>https://dev.to/vidhya_murali_5aabe7784bd/javascript-interview-questions-2536</link>
      <guid>https://dev.to/vidhya_murali_5aabe7784bd/javascript-interview-questions-2536</guid>
      <description>&lt;p&gt;&lt;strong&gt;Java vs JavaScript&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Java&lt;/em&gt; - Java is a statically typed, object-oriented programming language for building platform-independent applications.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;JavaScript&lt;/em&gt; - JavaScript is a dynamically typed scripting language primarily used for interactive web development.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scripting vs Programming Language&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All scripting languages are programming languages, but not all programming languages are scripting languages. The primary technical distinction lies in how the code is executed—scripting languages are traditionally interpreted line-by-line at runtime, while general programming languages are compiled into binary machine code before execution&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Array vs Objects&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In JavaScript, arrays and objects have specific behaviors, built-in methods, and performance characteristics that dictate how you use them.Technically, arrays in JavaScript are actually a special type of object under the hood, but they are treated differently in daily coding.
&lt;em&gt;Objects&lt;/em&gt; (Key-Value Pairs)Objects use curly braces {} and access data via text keys (properties) using dot notation or bracket notation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Promise&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In JavaScript, a Promise is an object representing the eventual completion (or failure) of an asynchronous operation and its resulting value.
Think of it like a buzzer at a restaurant: you order your food (start an async task), they give you a buzzer (the Promise), and you can continue talking to friends while the food cooks. When the buzzer lights up, you get your meal (the value) or a notification that they ran out of ingredients (the error).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Asynchronous Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An asynchronous function is a special type of JavaScript function defined with the async keyword that always returns a Promise and allows you to use the await keyword inside it.They provide a clean, sequential syntax for handling asynchronous operations, completely eliminating the need for messy .then() and .catch() chains.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>frontend</category>
    </item>
    <item>
      <title>HTML,CSS Questions</title>
      <dc:creator>vidhya murali</dc:creator>
      <pubDate>Sat, 23 May 2026 03:40:11 +0000</pubDate>
      <link>https://dev.to/vidhya_murali_5aabe7784bd/htmlcss-questions-23h7</link>
      <guid>https://dev.to/vidhya_murali_5aabe7784bd/htmlcss-questions-23h7</guid>
      <description>&lt;p&gt;&lt;strong&gt;Display Properties&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CSS display property defines how an element is shown on the webpage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Display Properties&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;display: block&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Element takes full width and starts on a new line.&lt;/p&gt;

&lt;p&gt;Examples: div, h1,p&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;display: inline&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Element takes only content width.&lt;/p&gt;

&lt;p&gt;Examples: span ,a, b&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;display: inline-block&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Combination of inline + block.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;display: none&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Element completely disappears&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Box-Sizing Property *&lt;/em&gt;:&lt;/p&gt;

&lt;p&gt;box-sizing defines how the total width and height of an element are calculated&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;box-sizing: content-box (Default)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Width only applies to content area.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;box-sizing: border-box&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Padding and border are included inside width&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>css</category>
      <category>programming</category>
    </item>
    <item>
      <title>GIT</title>
      <dc:creator>vidhya murali</dc:creator>
      <pubDate>Sat, 23 May 2026 03:29:39 +0000</pubDate>
      <link>https://dev.to/vidhya_murali_5aabe7784bd/git-5cd9</link>
      <guid>https://dev.to/vidhya_murali_5aabe7784bd/git-5cd9</guid>
      <description>&lt;p&gt;&lt;strong&gt;GIT&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is used to track changes in code, collaborate with others, and manage software projects efficiently.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Basic Git Workflow&lt;/strong&gt;&lt;br&gt;
Modify files&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;git add .&lt;/li&gt;
&lt;li&gt;git commit -m "message"&lt;/li&gt;
&lt;li&gt;git push
**
GitHub**&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitHub is a cloud-based platform used to host Git repositories and collaborate on software projects.&lt;/p&gt;

&lt;p&gt;It works together with Git.&lt;/p&gt;

&lt;p&gt;What GitHub is Used For&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storing code online&lt;/li&gt;
&lt;li&gt;Collaboration with teams&lt;/li&gt;
&lt;li&gt;Version control&lt;/li&gt;
&lt;li&gt;Open-source projects&lt;/li&gt;
&lt;li&gt;Portfolio for developers&lt;/li&gt;
&lt;li&gt;CI/CD and deployment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;GitLab&lt;/strong&gt; :&lt;/p&gt;

&lt;p&gt;GitLab is a web-based platform used for Git repository hosting, collaboration, DevOps, and CI/CD automation.&lt;/p&gt;

&lt;p&gt;It is similar to GitHub but includes more built-in DevOps features.&lt;/p&gt;

&lt;p&gt;Features of GitLab&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git repository hosting&lt;/li&gt;
&lt;li&gt;Version control&lt;/li&gt;
&lt;li&gt;Branch management&lt;/li&gt;
&lt;li&gt;Merge requests&lt;/li&gt;
&lt;li&gt;Issue tracking&lt;/li&gt;
&lt;li&gt;CI/CD pipelines&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>HTML, CSS interview Questions</title>
      <dc:creator>vidhya murali</dc:creator>
      <pubDate>Tue, 19 May 2026 03:27:29 +0000</pubDate>
      <link>https://dev.to/vidhya_murali_5aabe7784bd/html-css-interview-questions-3cmb</link>
      <guid>https://dev.to/vidhya_murali_5aabe7784bd/html-css-interview-questions-3cmb</guid>
      <description>&lt;p&gt;*&lt;em&gt;Meta tag *&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The  tag defines metadata about an HTML document. Metadata is data (information) about data.&lt;/li&gt;
&lt;li&gt; tags always go inside the  element, and are typically used to specify character set, page description, keywords, author of the document, and viewport settings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Alternate for HTML&lt;/strong&gt;&lt;br&gt;
XML:&lt;br&gt;
Extensible Markup Language (XML) is a markup language used for storing structured data. It uses custom tags to define the elements which support a wide range of elements. It was developed because HTML was unable to define new elements hence XML was introduced which was extensible to define custom elements.&lt;br&gt;
It was designed to store and transport data and contain information about the sender, receiver, heading, and message body. It is more focused on what data is rather than how data looks. It is used for representing documents, data, transactions, invoices, etc. &lt;/p&gt;

&lt;p&gt;Example: Implementation of the basic structure of XML code.&lt;/p&gt;

&lt;p&gt;XHTML:&lt;br&gt;
Extensible Hypertext Markup Language (XHTML) is a markup language that is used to create HTML documents that support custom tags to define new elements. It is more strict than HTML in terms of error handling i.e browser doesn't display web pages in case of errors in the markup document. It creates an XML version of the HTML document which must be marked up correctly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Box-Sizing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CSS Box Sizing&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The CSS box-sizing property defines how to calculate the width and height of an element: should the calculation include padding and borders, or not.&lt;/li&gt;
&lt;li&gt;By default, the width and height of an element is calculated like this:&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;- width + padding + border = actual width of an element&lt;/li&gt;
&lt;li&gt;- height + padding + border = actual height of an element
This means: When you set the width/height of an element, the element often appears bigger than you have set (because the element's border and padding are added to the element's specified width/height)&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>html</category>
      <category>css</category>
    </item>
  </channel>
</rss>
