<?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: Megalraja</title>
    <description>The latest articles on DEV Community by Megalraja (@megalraja).</description>
    <link>https://dev.to/megalraja</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4117855%2F0718cc39-b65b-4fcc-8bbd-af519acb1aa0.png</url>
      <title>DEV Community: Megalraja</title>
      <link>https://dev.to/megalraja</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/megalraja"/>
    <language>en</language>
    <item>
      <title>JavaScript Loops: why we use them - the first 3 types</title>
      <dc:creator>Megalraja</dc:creator>
      <pubDate>Fri, 02 Oct 2026 06:16:47 +0000</pubDate>
      <link>https://dev.to/megalraja/javascript-loops-why-we-use-them-the-first-3-types-hhg</link>
      <guid>https://dev.to/megalraja/javascript-loops-why-we-use-them-the-first-3-types-hhg</guid>
      <description>&lt;p&gt;while learning javascript I came across loops&lt;/p&gt;

&lt;p&gt;but before learning different types of loops, I want understand one question - why do we use loops?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do we use loops?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Loops allow us to repeat a &lt;strong&gt;block of code without rewrite same code again and again.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For example , without loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
       &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The loop becomes especially useful when working with large amounts of data, such as arrays.&lt;/p&gt;

&lt;p&gt;Types of loop:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt;&lt;strong&gt;for&lt;/strong&gt; loop:&lt;br&gt;
A for loop is useful when you know how many times you want to repeat something.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt;&lt;strong&gt;while&lt;/strong&gt; loop:&lt;/p&gt;

&lt;p&gt;A while loop checks the condition before executing the code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the condition is false from the beginning, the loop won't execute.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; &lt;strong&gt;do...while&lt;/strong&gt; Loop&lt;/p&gt;

&lt;p&gt;A do...while loop executes the code first and checks the condition afterward.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means it will execute at least once.&lt;/p&gt;

&lt;p&gt;Quick way to remember &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;for        - repeat with initialization, condition &amp;amp; update&lt;br&gt;
while        - check → execute&lt;br&gt;
do...while   - execute → check&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The key difference:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;while can execute zero times, but do...while executes at least once.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>code</category>
      <category>basic</category>
      <category>webdev</category>
    </item>
    <item>
      <title>CRUD Operations with JavaScript Objects</title>
      <dc:creator>Megalraja</dc:creator>
      <pubDate>Wed, 30 Sep 2026 14:57:57 +0000</pubDate>
      <link>https://dev.to/megalraja/crud-operations-with-javascript-objects-1g8d</link>
      <guid>https://dev.to/megalraja/crud-operations-with-javascript-objects-1g8d</guid>
      <description>&lt;p&gt;While learning JavaScript objects, I practiced a simple concept that appears everywhere in software development: CRUD.&lt;/p&gt;

&lt;p&gt;CRUD stands for:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create → Add data&lt;br&gt;
Read   → Access data&lt;br&gt;
Update → Change data&lt;br&gt;
Delete → Remove data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's use a vehicle object as an example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;vehicle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;KTM 350&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;fuelType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Fuel&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;cc&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;350&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;drive&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Speed: 150 km/h&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
    &lt;span class="p"&gt;}&lt;/span&gt; 
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;1.Create&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Add a new property:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;vehicle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gear&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2.Read&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Access existing data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;vehicle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;vehicle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can also call a method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="n"&gt;vehicle&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;drive&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3.Update&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Change an existing value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;vehicle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;210000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4.Delete&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Remove a property:Use &lt;strong&gt;delete&lt;/strong&gt; key word&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;delete vehicle.cc&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the cc property no longer exists.&lt;/p&gt;

&lt;p&gt;The basic idea&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create → vehicle.gear = 6&lt;br&gt;
Read   → vehicle.model&lt;br&gt;
Update → vehicle.price = 210000&lt;br&gt;
Delete → delete vehicle.cc&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This simple example helped me understand that CRUD isn't only related to databases or APIs.&lt;/p&gt;

&lt;p&gt;The same four operations can be practiced directly with JavaScript objects.&lt;/p&gt;

&lt;p&gt;I'm building my JavaScript fundamentals one concept at a time.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>coding</category>
    </item>
    <item>
      <title>JavaScript: Object Creation &amp; Constructor Functions</title>
      <dc:creator>Megalraja</dc:creator>
      <pubDate>Tue, 29 Sep 2026 14:56:05 +0000</pubDate>
      <link>https://dev.to/megalraja/javascript-object-creation-constructor-functions-2m13</link>
      <guid>https://dev.to/megalraja/javascript-object-creation-constructor-functions-2m13</guid>
      <description>&lt;p&gt;While learning JavaScript, I explored how objects can be created and reused.&lt;/p&gt;

&lt;p&gt;The simplest way is an object literal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;laptop&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;HP&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;H15&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;45000&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But when we need multiple objects with the same structure, a constructor function is useful:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Laptop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;laptop1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Laptop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;HP&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;H15&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;45000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;laptop2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Laptop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;MSI&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;MSI15&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;55000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, new creates a new object, and this refers to that newly created object.&lt;/p&gt;

&lt;p&gt;Simple idea:&lt;/p&gt;

&lt;p&gt;Constructor → Structure&lt;br&gt;
new → Creates object&lt;br&gt;
this → Sets object properties&lt;/p&gt;

&lt;p&gt;A small concept, but an important foundation for understanding JavaScript objects.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>learning</category>
      <category>programming</category>
    </item>
    <item>
      <title>JavaScript Parameters, Arguments, Default &amp; Rest Parameters</title>
      <dc:creator>Megalraja</dc:creator>
      <pubDate>Sun, 27 Sep 2026 16:01:11 +0000</pubDate>
      <link>https://dev.to/megalraja/javascript-parameters-arguments-default-rest-parameters-1a0b</link>
      <guid>https://dev.to/megalraja/javascript-parameters-arguments-default-rest-parameters-1a0b</guid>
      <description>&lt;p&gt;When I started learning JavaScript functions, I kept mixing up parameters and arguments. Then I came across default and rest parameters.&lt;/p&gt;

&lt;p&gt;Here’s how I understand them now.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Parameters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Parameters are the variables we define when creating a function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, name is a parameter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Arguments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Arguments are the actual values we pass when calling the function.&lt;/p&gt;

&lt;p&gt;plaintext&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, "John" is the argument.&lt;/p&gt;

&lt;p&gt;Parameter → placeholder&lt;br&gt;
Argument  → actual value&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Default Parameters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We can give a parameter a default value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nl"&gt;Output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;

&lt;span class="nx"&gt;Hello&lt;/span&gt; &lt;span class="nx"&gt;John&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we provide a value, the default value isn't used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;David&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nl"&gt;Output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;

&lt;span class="nx"&gt;Hello&lt;/span&gt; &lt;span class="nx"&gt;David&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Rest Parameters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What if we don't know how many arguments will be passed?&lt;/p&gt;

&lt;p&gt;We can use ... to collect them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="nl"&gt;Output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;

&lt;span class="mi"&gt;60&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;strong&gt;...numbers&lt;/strong&gt; collects the arguments into an array.&lt;/p&gt;

&lt;p&gt;Quick way to remember &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parameter → variable in the function&lt;br&gt;
Argument  → value passed to the function&lt;br&gt;
Default   → fallback value&lt;br&gt;
Rest      → collects multiple arguments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Understanding these four concepts made JavaScript functions much clearer for me.&lt;/p&gt;

&lt;p&gt;At first, &lt;strong&gt;parameters, arguments, default parameters,&lt;/strong&gt; and rest parameters looked like separate confusing topics. But once I understood how they work together, functions started making much more sense.&lt;/p&gt;

&lt;p&gt;Still learning, still practicing, and slowly building my JavaScript fundamentals one concept at a time. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What JavaScript concept confused you when you first started?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>basic</category>
    </item>
    <item>
      <title>JavaScript Arrow Functions</title>
      <dc:creator>Megalraja</dc:creator>
      <pubDate>Sat, 26 Sep 2026 14:30:17 +0000</pubDate>
      <link>https://dev.to/megalraja/javascript-arrow-functions-i9i</link>
      <guid>https://dev.to/megalraja/javascript-arrow-functions-i9i</guid>
      <description>&lt;p&gt;Today I learned about &lt;strong&gt;arrow functions&lt;/strong&gt; in JavaScript.&lt;/p&gt;

&lt;p&gt;An arrow function is a shorter way to write a function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Normal function&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Arrow function&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here:&lt;/p&gt;

&lt;p&gt;const add → stores the function&lt;br&gt;
(a, b) → parameters&lt;br&gt;
=&amp;gt; → arrow function syntax&lt;br&gt;
a + b → returned result&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;console.log(add(10, 20));&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="go"&gt;
Output:

30
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The shorter syntax makes simple functions easier to write and read.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdevlop</category>
      <category>cleancode</category>
      <category>programming</category>
    </item>
    <item>
      <title>JavaScript Functions Explained: The Basics I Finally Understood</title>
      <dc:creator>Megalraja</dc:creator>
      <pubDate>Fri, 25 Sep 2026 05:56:32 +0000</pubDate>
      <link>https://dev.to/megalraja/javascript-functions-explained-the-basics-i-finally-understood-30lp</link>
      <guid>https://dev.to/megalraja/javascript-functions-explained-the-basics-i-finally-understood-30lp</guid>
      <description>&lt;p&gt;While learning JavaScript, I recently started understanding &lt;strong&gt;functions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A function is a reusable block of code that performs a specific task.&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Function
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello John!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello John!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can also pass values using &lt;strong&gt;parameters&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;name&lt;/code&gt; is the &lt;strong&gt;parameter&lt;/strong&gt;, and &lt;code&gt;"John"&lt;/code&gt; is the &lt;strong&gt;argument&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Returning a Value
&lt;/h3&gt;

&lt;p&gt;Functions can return a value using &lt;code&gt;return&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Arrow Function
&lt;/h3&gt;

&lt;p&gt;JavaScript also provides a shorter syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The main thing I learned:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Functions help us write reusable, organized, and less repetitive code.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I'm continuing my JavaScript fundamentals step by step.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>learning</category>
    </item>
    <item>
      <title>JavaScript Primitive Data Types Explained for Beginners</title>
      <dc:creator>Megalraja</dc:creator>
      <pubDate>Thu, 24 Sep 2026 14:37:56 +0000</pubDate>
      <link>https://dev.to/megalraja/javascript-primitive-data-types-explained-for-beginners-4285</link>
      <guid>https://dev.to/megalraja/javascript-primitive-data-types-explained-for-beginners-4285</guid>
      <description>&lt;p&gt;While learning JavaScript, one of the first concepts I wanted to understand properly was data types.&lt;/p&gt;

&lt;p&gt;JavaScript has several data types, but they can be divided into two main categories:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Primitive data types&lt;br&gt;
Non-primitive data types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this post, I'm focusing only on primitive data types.&lt;/p&gt;

&lt;p&gt;What is a Primitive Data Type?&lt;/p&gt;

&lt;p&gt;A primitive data type represents a single, simple value.&lt;/p&gt;

&lt;p&gt;JavaScript has 7 primitive data types:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;String&lt;/li&gt;
&lt;li&gt;Number&lt;/li&gt;
&lt;li&gt;BigInt&lt;/li&gt;
&lt;li&gt;Boolean&lt;/li&gt;
&lt;li&gt;Undefined&lt;/li&gt;
&lt;li&gt;Null&lt;/li&gt;
&lt;li&gt;Symbol&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's understand each one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. String&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A String is used to store text.&lt;/p&gt;

&lt;p&gt;let name = "John";&lt;br&gt;
let city = "Chennai";&lt;/p&gt;

&lt;p&gt;Strings can use:&lt;/p&gt;

&lt;p&gt;"Double quotes"&lt;br&gt;
'Single quotes'&lt;br&gt;
&lt;code&gt;Backticks&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;let message = "Hello John";&lt;/p&gt;

&lt;p&gt;console.log(message);&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Hello John&lt;/p&gt;

&lt;p&gt;Check the type:&lt;/p&gt;

&lt;p&gt;console.log(typeof message);&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;string&lt;br&gt;
&lt;strong&gt;2. Number&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The Number type is used for numbers, including integers and decimal values.&lt;/p&gt;

&lt;p&gt;let age = 25;&lt;br&gt;
let price = 99.99;&lt;br&gt;
let temperature = -10;&lt;/p&gt;

&lt;p&gt;All of these are number.&lt;/p&gt;

&lt;p&gt;console.log(typeof age);&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;number&lt;/p&gt;

&lt;p&gt;JavaScript doesn't have separate int and float types like some other programming languages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. BigInt&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;BigInt is used for very large integers that cannot be safely represented by the normal Number type.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;let bigNumber = 123456789012345678901234567890n;&lt;/p&gt;

&lt;p&gt;Notice the n at the end.&lt;/p&gt;

&lt;p&gt;console.log(typeof bigNumber);&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;bigint&lt;/p&gt;

&lt;p&gt;You can think of it as:&lt;/p&gt;

&lt;p&gt;Number → normal-sized numbers&lt;br&gt;
BigInt  → very large integers&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;4. Boolean *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A Boolean can have only two values:&lt;/p&gt;

&lt;p&gt;true&lt;br&gt;
false&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;`let isLoggedIn = true;&lt;br&gt;
let isAdmin = false;&lt;/p&gt;

&lt;p&gt;Booleans are commonly used with conditions.&lt;/p&gt;

&lt;p&gt;if (isLoggedIn) {&lt;br&gt;
    console.log("Welcome John!");&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Welcome John!`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Undefined&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;undefined usually means a variable has been declared but hasn't been given a value.&lt;/p&gt;

&lt;p&gt;let username;&lt;/p&gt;

&lt;p&gt;console.log(username);&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;undefined&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;let age;&lt;/p&gt;

&lt;p&gt;console.log(typeof age);&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;undefined&lt;/p&gt;

&lt;p&gt;So a simple way to remember it is:&lt;/p&gt;

&lt;p&gt;Declared but no value → undefined&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Null&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;null represents an intentional absence of a value.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;let selectedUser = null;&lt;/p&gt;

&lt;p&gt;Here, we are intentionally saying that there is currently no selected user.&lt;/p&gt;

&lt;p&gt;One interesting JavaScript behavior is:&lt;/p&gt;

&lt;p&gt;console.log(typeof null);&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;object&lt;/p&gt;

&lt;p&gt;This is a well-known historical quirk of JavaScript.&lt;/p&gt;

&lt;p&gt;Even though typeof null returns "object", null is considered a primitive value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Symbol&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Symbol is used to create unique values.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;let id1 = Symbol("id");&lt;br&gt;
let id2 = Symbol("id");&lt;/p&gt;

&lt;p&gt;console.log(id1 === id2);&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;false&lt;/p&gt;

&lt;p&gt;Even though both symbols have the same description, they are different unique values.&lt;/p&gt;

&lt;p&gt;Symbols are mainly useful when unique identifiers are needed.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Quick Cheat Sheet *&lt;/em&gt;&lt;br&gt;
Primitive Type  Example&lt;br&gt;
String  "John"&lt;br&gt;
Number  25&lt;br&gt;
BigInt  123n&lt;br&gt;
Boolean true&lt;br&gt;
Undefined   undefined&lt;br&gt;
Null    null&lt;br&gt;
Symbol  Symbol("id")&lt;br&gt;
One Important Thing&lt;/p&gt;

&lt;p&gt;These 7 types are primitive data types in JavaScript:&lt;/p&gt;

&lt;p&gt;String&lt;br&gt;
Number&lt;br&gt;
BigInt&lt;br&gt;
Boolean&lt;br&gt;
Undefined&lt;br&gt;
Null&lt;br&gt;
Symbol&lt;/p&gt;

&lt;p&gt;Understanding these basics makes it easier to learn the next JavaScript concepts, such as:&lt;/p&gt;

&lt;p&gt;Variables&lt;br&gt;
Operators&lt;br&gt;
Type conversion&lt;br&gt;
Conditions&lt;br&gt;
Functions&lt;br&gt;
Arrays&lt;br&gt;
Objects&lt;/p&gt;

&lt;p&gt;I'm learning JavaScript step by step, and understanding the basics properly is helping me build a stronger foundation.&lt;/p&gt;

&lt;p&gt;What's the JavaScript data type you found confusing at first?&lt;/p&gt;

&lt;h1&gt;
  
  
  javascript #webdevelopment #programming #frontend #coding #beginners #learningtocode
&lt;/h1&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>frontend</category>
      <category>programming</category>
    </item>
    <item>
      <title>CSS Position Explained: Static, Relative, Absolute, Fixed &amp; Sticky.</title>
      <dc:creator>Megalraja</dc:creator>
      <pubDate>Wed, 23 Sep 2026 14:15:08 +0000</pubDate>
      <link>https://dev.to/megalraja/css-position-explained-static-relative-absolute-fixed-sticky-13dc</link>
      <guid>https://dev.to/megalraja/css-position-explained-static-relative-absolute-fixed-sticky-13dc</guid>
      <description>&lt;p&gt;When I started learning CSS, position was one of those properties that looked simple but was actually confusing.&lt;/p&gt;

&lt;p&gt;I knew there were values like relative, absolute, fixed, and sticky, but I wasn't really sure when to use each one.&lt;/p&gt;

&lt;p&gt;So I decided to understand them with simple examples.&lt;/p&gt;

&lt;p&gt;What is the CSS position property?&lt;/p&gt;

&lt;p&gt;The position property controls how an element is positioned on a webpage.&lt;/p&gt;

&lt;p&gt;The most commonly used values are:&lt;/p&gt;

&lt;p&gt;position: static;&lt;br&gt;
position: relative;&lt;br&gt;
position: absolute;&lt;br&gt;
position: fixed;&lt;br&gt;
position: sticky;&lt;/p&gt;

&lt;p&gt;Let's understand them one by one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. position: static&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;static is the default position of an element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;
&lt;span class="nc"&gt;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;static&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The element stays in the normal document flow.&lt;/p&gt;

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

&lt;p&gt;Hello&lt;/p&gt;

&lt;p&gt;With static, properties like:&lt;/p&gt;

&lt;p&gt;top&lt;br&gt;
right&lt;br&gt;
bottom&lt;br&gt;
left&lt;/p&gt;

&lt;p&gt;don't move the element.&lt;/p&gt;

&lt;p&gt;So this won't have the expected positioning effect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;static&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The element remains in its normal position.&lt;/p&gt;

&lt;p&gt;Think: static = normal/default positioning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. position: relative&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;relative keeps the element in the normal document flow, but now we can move it using:&lt;/p&gt;

&lt;p&gt;top&lt;br&gt;
right&lt;br&gt;
bottom&lt;br&gt;
left&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The box moves 20px down and 30px to the right from its original position.&lt;/p&gt;

&lt;p&gt;One important thing:&lt;/p&gt;

&lt;p&gt;The element's original space is still preserved.&lt;/p&gt;

&lt;p&gt;So other elements don't act as if the box completely disappeared from its original position.&lt;/p&gt;

&lt;p&gt;Think: relative = normal position + ability to move.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. position: absolute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one is a little different.&lt;/p&gt;

&lt;p&gt;An absolutely positioned element is removed from the normal document flow.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;
&lt;span class="nc"&gt;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The element is positioned relative to its nearest positioned ancestor.&lt;/p&gt;

&lt;p&gt;Usually, we create a parent with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.parent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;and then position the child:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.child&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"parent"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"child"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Hello&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
.parent {
  position: relative;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.child&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;This pattern is very common.&lt;/p&gt;

&lt;p&gt;For example, you might use it for:&lt;/p&gt;

&lt;p&gt;Notification badges &lt;br&gt;
Icons inside input boxes&lt;br&gt;
Text over images&lt;br&gt;
Dropdown menus&lt;br&gt;
Buttons positioned inside cards&lt;/p&gt;

&lt;p&gt;Think: absolute = remove from normal flow and position precisely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. position: fixed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;fixed positions an element relative to the viewport.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;fixed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The button stays in the same place even when you scroll.&lt;/p&gt;

&lt;p&gt;This is useful for things like:&lt;/p&gt;

&lt;p&gt;Floating buttons&lt;br&gt;
Chat buttons&lt;br&gt;
Back-to-top buttons&lt;br&gt;
Fixed navigation bars&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;
&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"top-button"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;↑&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
.top-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the button remains visible while scrolling.&lt;/p&gt;

&lt;p&gt;Think: fixed = fixed to the viewport.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. position: sticky&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;sticky is probably the most interesting one.&lt;/p&gt;

&lt;p&gt;It behaves like a normal element initially, but when you scroll to a specified position, it sticks there.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;
&lt;span class="nt"&gt;header&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;sticky&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;The header behaves normally until it reaches the top of the viewport.&lt;/p&gt;

&lt;p&gt;Then it sticks there while scrolling.&lt;/p&gt;

&lt;p&gt;This is commonly used for:&lt;/p&gt;

&lt;p&gt;Sticky navigation bars&lt;br&gt;
Table headers&lt;br&gt;
Section headings&lt;br&gt;
Sidebar elements&lt;/p&gt;

&lt;p&gt;Think: sticky = normal until scrolling reaches the specified position.&lt;/p&gt;

&lt;p&gt;The basic idea is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;static    → normal&lt;br&gt;
relative  → move from normal position&lt;br&gt;
absolute  → precise positioning&lt;br&gt;
fixed     → attached to viewport&lt;br&gt;
sticky    → sticks while scrolling&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>frontend</category>
      <category>beginners</category>
    </item>
    <item>
      <title>CSS Grid Areas — A Simple Way to Build Layouts</title>
      <dc:creator>Megalraja</dc:creator>
      <pubDate>Mon, 21 Sep 2026 15:34:06 +0000</pubDate>
      <link>https://dev.to/megalraja/css-grid-areas-a-simple-way-to-build-layouts-2j6b</link>
      <guid>https://dev.to/megalraja/css-grid-areas-a-simple-way-to-build-layouts-2j6b</guid>
      <description>&lt;p&gt;When I started learning CSS Grid, I found &lt;code&gt;grid-template-areas&lt;/code&gt; really interesting because it lets us &lt;strong&gt;name different parts of a layout&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of thinking only in rows and columns, we can give each section a name.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-areas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="s1"&gt;"header header"&lt;/span&gt;
    &lt;span class="s1"&gt;"sidebar main"&lt;/span&gt;
    &lt;span class="s1"&gt;"footer footer"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.header&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;grid-area&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;header&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.sidebar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;grid-area&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;sidebar&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.main&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;grid-area&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.footer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;grid-area&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;footer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The layout looks something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌───────────────┐
│    HEADER     │
├──────┬────────┤
│ SIDE │  MAIN  │
│ BAR  │        │
├──────┴────────┤
│    FOOTER     │
└───────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why I like Grid Areas
&lt;/h3&gt;

&lt;p&gt;It makes the CSS &lt;strong&gt;easier to read and understand&lt;/strong&gt;.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;grid-template-areas&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
  &lt;span class="s1"&gt;"header header"&lt;/span&gt;
  &lt;span class="s1"&gt;"sidebar main"&lt;/span&gt;
  &lt;span class="s1"&gt;"footer footer"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can almost understand the page layout just by looking at it.&lt;/p&gt;

&lt;p&gt;As a beginner, I think &lt;strong&gt;Grid Areas is one of the easiest ways to understand CSS Grid layouts&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>GPT-6 Astra Made Me Think About My Developer Journey</title>
      <dc:creator>Megalraja</dc:creator>
      <pubDate>Sun, 13 Sep 2026 14:31:01 +0000</pubDate>
      <link>https://dev.to/megalraja/gpt-6-astra-made-me-think-about-my-developer-journey-5e4o</link>
      <guid>https://dev.to/megalraja/gpt-6-astra-made-me-think-about-my-developer-journey-5e4o</guid>
      <description>&lt;p&gt;I’m still a beginner in software development.&lt;/p&gt;

&lt;p&gt;I’m learning HTML, CSS, JavaScript, Git, and slowly trying to build real projects.&lt;/p&gt;

&lt;p&gt;Then I see something like** GPT-6 Astra **being introduced. &lt;/p&gt;

&lt;p&gt;And honestly, my first thought was:&lt;/p&gt;

&lt;p&gt;“If AI can write code this well, what should I be learning?”&lt;/p&gt;

&lt;p&gt;But after thinking about it, I realized something.&lt;/p&gt;

&lt;p&gt;I’m not learning to code just to type code faster.&lt;br&gt;
I’m learning to understand how software works.&lt;/p&gt;

&lt;p&gt;AI can generate code.&lt;br&gt;
But I still need to know:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does this code work?&lt;br&gt;
Why did it fail?&lt;br&gt;
How do I debug it?&lt;br&gt;
Is the solution actually good?&lt;br&gt;
How can I change it when my requirements are different?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As a student, I think that's where the real learning happens.&lt;/p&gt;

&lt;p&gt;Maybe AI will change the way we become developers.&lt;/p&gt;

&lt;p&gt;But for now, I want to keep doing the simple things:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn → Practice → Build → Break → Fix → Repeat.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I don't know where AI will take software development.&lt;/p&gt;

&lt;p&gt;But I know one thing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I want to be ready for it.&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  devjourney #studentdeveloper #begindeveloper #coding #ai #gpt6 #webdevelopment #learningtocode
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What Actually Happens When You Type a URL in Your Browser?</title>
      <dc:creator>Megalraja</dc:creator>
      <pubDate>Sat, 12 Sep 2026 11:05:45 +0000</pubDate>
      <link>https://dev.to/megalraja/what-actually-happens-when-you-type-a-url-in-your-browser-1b1n</link>
      <guid>https://dev.to/megalraja/what-actually-happens-when-you-type-a-url-in-your-browser-1b1n</guid>
      <description>&lt;p&gt;Have you ever wondered what happens after you type something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://dev.to
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and press &lt;strong&gt;Enter&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;It looks instant.&lt;/p&gt;

&lt;p&gt;But behind that one click, your browser performs several steps before showing you the webpage.&lt;/p&gt;

&lt;p&gt;Let’s break it down. &lt;/p&gt;




&lt;h2&gt;
  
  
  1. You Enter a URL
&lt;/h2&gt;

&lt;p&gt;You type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://dev.to
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A URL contains different parts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://dev.to/article
│       │      │
│       │      └── Path
│       └───────── Domain
└───────────────── Protocol
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The browser first understands what resource you're trying to access.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. DNS Finds the Server
&lt;/h2&gt;

&lt;p&gt;Computers communicate using IP addresses, not domain names.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dev.to
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;needs to be translated into an IP address.&lt;/p&gt;

&lt;p&gt;That's where &lt;strong&gt;DNS (Domain Name System)&lt;/strong&gt; comes in.&lt;/p&gt;

&lt;p&gt;You can think of DNS like the internet's phonebook:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dev.to
   ↓
DNS
   ↓
IP address
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The browser can now find the server hosting the website.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. The Browser Connects to the Server
&lt;/h2&gt;

&lt;p&gt;Now the browser needs to communicate with that server.&lt;/p&gt;

&lt;p&gt;For an HTTPS website, the connection is secured using &lt;strong&gt;TLS&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Simplified:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Browser
   ↓
Secure connection
   ↓
Web Server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This helps protect the data exchanged between your browser and the website.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. The Browser Sends an HTTP Request
&lt;/h2&gt;

&lt;p&gt;The browser sends a request to the server.&lt;/p&gt;

&lt;p&gt;Something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="nf"&gt;GET&lt;/span&gt; &lt;span class="nn"&gt;/&lt;/span&gt; &lt;span class="k"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt;
&lt;span class="na"&gt;Host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;dev.to&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Basically, it's saying:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Hey server, give me this webpage.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  5. The Server Sends a Response
&lt;/h2&gt;

&lt;p&gt;The server processes the request and sends data back.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="k"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt; &lt;span class="m"&gt;200&lt;/span&gt; &lt;span class="ne"&gt;OK&lt;/span&gt;
&lt;span class="na"&gt;Content-Type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;text/html&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the response contains HTML, CSS, JavaScript, images, and other resources.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. The Browser Builds the Page
&lt;/h2&gt;

&lt;p&gt;Now the interesting part happens.&lt;/p&gt;

&lt;p&gt;The browser takes the HTML and creates the &lt;strong&gt;DOM (Document Object Model)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Then it processes CSS to determine how everything should look.&lt;/p&gt;

&lt;p&gt;JavaScript can also modify the page and make it interactive.&lt;/p&gt;

&lt;p&gt;A simplified flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTML
 ↓
DOM

CSS
 ↓
Styles

JavaScript
 ↓
Interactions

Everything
 ↓
Rendered Page
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  7. You Finally See the Website
&lt;/h2&gt;

&lt;p&gt;After all of that, your browser displays the webpage.&lt;/p&gt;

&lt;p&gt;And all you did was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Type URL → Press Enter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The Whole Process
&lt;/h2&gt;

&lt;p&gt;Here's the simplified version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter URL
    ↓
Browser understands URL
    ↓
DNS finds IP address
    ↓
Secure connection is established
    ↓
HTTP request
    ↓
Server processes request
    ↓
HTTP response
    ↓
Browser processes HTML/CSS/JS
    ↓
Page appears
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pretty wild when you think about it.&lt;/p&gt;

&lt;p&gt;A webpage appearing in a couple of seconds involves &lt;strong&gt;DNS, networking, servers, HTTP, security, HTML, CSS, JavaScript, and browser rendering&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Should Developers Know This?
&lt;/h2&gt;

&lt;p&gt;You don't need to become a networking expert to build websites.&lt;/p&gt;

&lt;p&gt;But understanding this process makes many things easier to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why websites sometimes load slowly&lt;/li&gt;
&lt;li&gt;What DNS errors mean&lt;/li&gt;
&lt;li&gt;What HTTP status codes are&lt;/li&gt;
&lt;li&gt;How APIs communicate&lt;/li&gt;
&lt;li&gt;Why HTTPS matters&lt;/li&gt;
&lt;li&gt;How browsers render webpages&lt;/li&gt;
&lt;li&gt;Where performance problems can happen&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The better you understand what happens &lt;strong&gt;under the hood&lt;/strong&gt;, the easier it becomes to debug problems.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;The next time you type a URL and a website magically appears...&lt;/p&gt;

&lt;p&gt;Remember:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It wasn't magic.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It was a whole bunch of computers doing their jobs really fast. &lt;/p&gt;




&lt;h1&gt;
  
  
  webdev #beginners #javascript #html #css #programming
&lt;/h1&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>browser</category>
    </item>
    <item>
      <title>HTML vs CSS vs JavaScript:What Does Each One Do?</title>
      <dc:creator>Megalraja</dc:creator>
      <pubDate>Fri, 11 Sep 2026 15:52:14 +0000</pubDate>
      <link>https://dev.to/megalraja/html-vs-css-vs-javascriptwhat-does-each-one-do-1k60</link>
      <guid>https://dev.to/megalraja/html-vs-css-vs-javascriptwhat-does-each-one-do-1k60</guid>
      <description>&lt;p&gt;When I first started learning web devlopment, I used to see &lt;strong&gt;HTML,CSS&lt;/strong&gt; and &lt;strong&gt;javaScript&lt;/strong&gt; everywhere.&lt;/p&gt;

&lt;p&gt;I knew they were all important, but I didn't really understand what each one was resposiple for.&lt;br&gt;
The easiest way to understand them is to think about building a house.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML  - The structrue&lt;/li&gt;
&lt;li&gt;CSS   - The apperance&lt;/li&gt;
&lt;li&gt;JavaScript - The behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's break it down&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;1. HTML --- The structure *&lt;/em&gt;&lt;br&gt;
  HTMl (Hypertext Markup Language) defines the structure and content of a webpages.&lt;/p&gt;

&lt;p&gt;it tells the browser:&lt;br&gt;
 "What element should be on this web page?"&lt;/p&gt;

&lt;p&gt;for example:&lt;br&gt;
&lt;/p&gt;
&lt;h1&gt;welcome to my website&lt;/h1&gt;


&lt;p&gt;This is my first website.&lt;/p&gt;

&lt;p&gt;click Me&lt;br&gt;
but it doesn't look particulary fance yet.&lt;br&gt;
HTML is basically the skeleton of the webpage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. CSS --- The Appearance&lt;/strong&gt;&lt;br&gt;
 css(cascading Style Sheet) controls how those HTML elements look.&lt;/p&gt;

&lt;p&gt;it tells the browser :&lt;br&gt;
"how Should these elements look and where should they be positioned ?"&lt;/p&gt;

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

&lt;p&gt;h1{&lt;br&gt;
font-size:40px;&lt;br&gt;
}&lt;br&gt;
button{&lt;br&gt;
padding:10px 20px;&lt;br&gt;
border-radius:8px;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Now we can change things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Colors&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fonts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sizes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Spacing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Layout&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Animations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Responsive design&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CSS is basically the clothes and design of the webpage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. JavaScript --- The behavior&lt;/strong&gt;&lt;br&gt;
    JavaScript makes Webpage interactive and dynamic &lt;/p&gt;

&lt;p&gt;it tells the browser:&lt;br&gt;
  "What should happen when the user does something?"&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
const button = document.querySelector("button")&lt;/p&gt;

&lt;p&gt;button.addEventList("click",() =&amp;gt;{&lt;br&gt;
alert("Hello!");&lt;br&gt;
});&lt;/p&gt;

&lt;p&gt;Now something actually happens when user clicks the button.&lt;/p&gt;

&lt;p&gt;JavaScript can handle things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Button clicks&lt;/li&gt;
&lt;li&gt;Form validation&lt;/li&gt;
&lt;li&gt;Menus&lt;/li&gt;
&lt;li&gt;API requests&lt;/li&gt;
&lt;li&gt;Updating webpage content&lt;/li&gt;
&lt;li&gt;Animations&lt;/li&gt;
&lt;li&gt;Games&lt;/li&gt;
&lt;li&gt;Interactive applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;JavaScript is basically the brain of the webpage&lt;/p&gt;

&lt;p&gt;One More Important Thing&lt;br&gt;
HTML, CSS, and JavaScript aren't competitors.&lt;/p&gt;

&lt;p&gt;They solve different problems.&lt;/p&gt;

&lt;p&gt;You don't use JavaScript instead of HTML or CSS.&lt;/p&gt;

&lt;p&gt;Instead, they work together:&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;         WEB PAGE
            │
   ┌────────┼────────┐
   ↓        ↓        ↓
 HTML      CSS    JavaScript
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Structure  Design   Behavior&lt;/p&gt;

&lt;p&gt;Once I understood this separation, web development became much easier to understand.&lt;/p&gt;

&lt;p&gt;And honestly, you don't need to master everything at once.&lt;/p&gt;

&lt;p&gt;Start with HTML → CSS → JavaScript and build small projects along the way.&lt;/p&gt;

&lt;p&gt;That's where things start clicking.&lt;/p&gt;



</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
