<?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: Ezhil Arasan</title>
    <description>The latest articles on DEV Community by Ezhil Arasan (@ezhil_arasan_d1230a486501).</description>
    <link>https://dev.to/ezhil_arasan_d1230a486501</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%2F3924293%2F4e14af4d-f0d8-4b4d-8061-246d4b41d292.jpg</url>
      <title>DEV Community: Ezhil Arasan</title>
      <link>https://dev.to/ezhil_arasan_d1230a486501</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ezhil_arasan_d1230a486501"/>
    <language>en</language>
    <item>
      <title>My day</title>
      <dc:creator>Ezhil Arasan</dc:creator>
      <pubDate>Mon, 22 Jun 2026 19:32:51 +0000</pubDate>
      <link>https://dev.to/ezhil_arasan_d1230a486501/my-day-38ed</link>
      <guid>https://dev.to/ezhil_arasan_d1230a486501/my-day-38ed</guid>
      <description>&lt;p&gt;This is the day,  which is the biggest change in my life. A life of a  man is started in graduation, but I failed in the graduation. Am Ezhilarasan pursing BE degree in chennai, I had the 2 backlogs in my studies in final semester. College of my life is finished but I was ashamed to tell that I am an Engineering student.&lt;/p&gt;

&lt;p&gt;Every mam begins with failure, so I decided that today is my  changing point of my life. Today (22nd JUNE 2026), I going to put  the failure of my life to an end on today. The new life begins tomorrow. Every steps of my life here after I gonna to take carefully  and to make my mind to mark risk to make my life even better then ever, to settle in my life.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"REMEMBER THAT FAILURE IS NOT OPPOSITE OF SUCCESS, IT'S PART OF SUCCESS"&lt;/strong&gt;this is the quotes am  taken as to realize the my current situation, here after there is no wasting time , money ,etc in my life time until I see my successful life time. The way I came up in my may be wrong, but I am not going to do the same mistake ever in my life, new life begins at this moment.&lt;/p&gt;

&lt;p&gt;Am going to make my life a perfect, my goal here after is only &lt;br&gt;
making money at any cost of my situation. I remember a quote &lt;strong&gt;"MONEY MAKES EVERYTHING"&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;I had my worst days, ever decision of my life is taken by my family members and the situation that the moment, but now at this point at this moment am talking my own complete satisfied decision to be successful in my life.&lt;/p&gt;

&lt;p&gt;I may take some days to over come but no way am gonna lose or give up at any cost and at any situation. I will success, my mind in the state that I cant satisfied about my life, at the present moment am I am in my failure, I  dont know that  how am going to make my life success.&lt;/p&gt;

&lt;p&gt;I am pursing JAVA fullstack course, but how am going to get the job in the future is big question mark? So now I going to take my a decision that to create a business and make the successful businessman and succeed in my life.&lt;/p&gt;

&lt;p&gt;Why I make this decision now? when I make my life successful there is no person to ask questions on me, most of the people why we want to answer for them? this a good question but did you think that we are living in society (relatives, friends, family ,etc) of making questions on other life only so we must them , not by talking, shouting but answer them with your success, make the society silent by you success.&lt;/p&gt;

&lt;p&gt;It doesn't matter how I failed now? It doesn't matter how many times I failed in my life here after? at last I will succeed in my life so there is no doubt I will make my life successful.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Array in JavaScrip</title>
      <dc:creator>Ezhil Arasan</dc:creator>
      <pubDate>Fri, 19 Jun 2026 14:20:52 +0000</pubDate>
      <link>https://dev.to/ezhil_arasan_d1230a486501/array-in-javascrip-1hna</link>
      <guid>https://dev.to/ezhil_arasan_d1230a486501/array-in-javascrip-1hna</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is an array?&lt;/strong&gt;&lt;br&gt;
An array in JavaScript is a global object used to store an ordered collection of multiple values under a single variable name. JavaScript arrays are zero-indexed, dynamic in size, and can hold a mix of different data types &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Use Arrays?&lt;/strong&gt;&lt;br&gt;
If you have a list of items (a list of bike names, for example), storing the names in single variables could look like this:&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;bike1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Pulser&lt;/span&gt;&lt;span class="dl"&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;bike2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;apache&lt;/span&gt;&lt;span class="dl"&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;bike3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;duke&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;&lt;strong&gt;Creating an Array&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using an array literal is the easiest way to create a JavaScript Array.&lt;/p&gt;

&lt;p&gt;Syntax:&lt;br&gt;
&lt;code&gt;const array_name = [item1, item2, ...];&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;const&lt;/span&gt; &lt;span class="nx"&gt;bike&lt;/span&gt; &lt;span class="o"&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;pulser&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;apache&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;duke&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;&lt;strong&gt;Converting an Array to a String&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The JavaScript method toString() converts an array to a string of (comma separated) array values.&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;fruits&lt;/span&gt; &lt;span class="o"&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;Banana&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;Orange&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;Apple&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;Mango&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;demo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fruits&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&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;Arrays are Objects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Arrays are a special type of objects. The typeof operator in JavaScript returns "object" for arrays.&lt;/p&gt;

&lt;p&gt;But, JavaScript arrays are best described as arrays.&lt;/p&gt;

&lt;p&gt;Arrays use numbers to access its "elements". In this example, person[0] returns John:&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;person&lt;/span&gt; &lt;span class="o"&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;John&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;Doe&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;46&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;Array Elements Can Be Objects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript variables can be objects. Arrays are special kinds of objects.&lt;/p&gt;

&lt;p&gt;Because of this, you can have variables of different types in the same Array.&lt;/p&gt;

&lt;p&gt;You can have objects in an Array. You can have functions in an Array. You can have arrays in an Array:&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;myArray&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="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;now&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;myArray&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="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;myFunction&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;myArray&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="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;myCars&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;Looping Array Elements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One way to loop through an array, is using a for 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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fruits&lt;/span&gt; &lt;span class="o"&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;Banana&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;Orange&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;Apple&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;Mango&lt;/span&gt;&lt;span class="dl"&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;fLen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fruits&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&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;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&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;0&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="nx"&gt;fLen&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;text&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;fruits&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="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;/li&amp;gt;&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;text&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;/ul&amp;gt;&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;&lt;strong&gt;Adding Array Elements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The easiest way to add a new element to an array is using the push() method:&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;fruits&lt;/span&gt; &lt;span class="o"&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;Banana&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;Orange&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;Apple&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="nx"&gt;fruits&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Lemon&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// Adds a new element (Lemon) to fruits &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Associative Arrays&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Many programming languages support arrays with named indexes.&lt;/p&gt;

&lt;p&gt;Arrays with named indexes are called associative arrays (or hashes).&lt;/p&gt;

&lt;p&gt;JavaScript does not support arrays with named indexes.&lt;/p&gt;

&lt;p&gt;In JavaScript, arrays always use numbered indexes.&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;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
&lt;span class="nx"&gt;person&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="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="nx"&gt;person&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="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Doe&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;person&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="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;    &lt;span class="c1"&gt;// Will return 3&lt;/span&gt;
&lt;span class="nx"&gt;person&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="c1"&gt;// Will return "John" &lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to Use Arrays. When to use Objects.&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;JavaScript does not support associative arrays.
You should use objects when you want the element names to be strings (text).
You should use arrays when you want the element names to be numbers.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Nested Arrays and Objects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Values in objects can be arrays, and values in arrays can be objects:&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;myObj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&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;span class="na"&gt;age&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="na"&gt;cars&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;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Ford&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;models&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Fiesta&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;Focus&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;Mustang&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="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;BMW&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;models&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;320&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;X3&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;X5&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="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Fiat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;models&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;500&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;Panda&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;Basic Array Methods&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;Array length&lt;br&gt;
Array toString()&lt;br&gt;
Array at()&lt;br&gt;
Array join()&lt;br&gt;
Array pop()&lt;br&gt;
Array push()&lt;br&gt;
Array shift()&lt;br&gt;
Array unshift()&lt;br&gt;
Array isArray()&lt;br&gt;
Array delete()&lt;br&gt;
Array concat()&lt;br&gt;
Array copyWithin()&lt;br&gt;
Array flat()&lt;br&gt;
Array slice()&lt;br&gt;
Array splice()&lt;br&gt;
Array toSpliced()&lt;br&gt;
Array some() &lt;br&gt;
Array reduce()&lt;br&gt;
Array map()&lt;br&gt;
Array every()&lt;br&gt;
Array flatMap()&lt;br&gt;
Array filter() &lt;br&gt;
Array findindex() &lt;br&gt;
Array find() &lt;br&gt;
Array fill() &lt;br&gt;
Array forEach() &lt;br&gt;
Array sort() &lt;br&gt;
Array concat() &lt;br&gt;
Array includes() &lt;br&gt;
Array reverse()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Refrence&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.w3schools.com/js/js_arrays.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/js/js_arrays.asp&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/javascript/best-known-javascript-array-methods/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/javascript/best-known-javascript-array-methods/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Boolean/CRUD/Boilerplate</title>
      <dc:creator>Ezhil Arasan</dc:creator>
      <pubDate>Thu, 18 Jun 2026 15:46:46 +0000</pubDate>
      <link>https://dev.to/ezhil_arasan_d1230a486501/booleancrudboilerplate-52c3</link>
      <guid>https://dev.to/ezhil_arasan_d1230a486501/booleancrudboilerplate-52c3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Booleans&lt;/strong&gt;&lt;br&gt;
Very often in programming, you will need a data type that can only have one of two values, like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;    YES / NO&lt;/li&gt;
&lt;li&gt;    ON / OFF&lt;/li&gt;
&lt;li&gt;    TRUE / FALSE&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For this, Java has a boolean data type, which can store true or false values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Boolean Values&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A boolean type is declared with the boolean keyword and can only take the values true or false:&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="kt"&gt;boolean&lt;/span&gt; &lt;span class="n"&gt;isJavaFun&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;boolean&lt;/span&gt; &lt;span class="n"&gt;isFishTasty&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;isJavaFun&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;    &lt;span class="c1"&gt;// Outputs true&lt;/span&gt;
&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;isFishTasty&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// Outputs false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Boolean Expressions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A boolean expression returns a boolean value: true or false.&lt;br&gt;
This is useful to build logic and make decisions in programs.&lt;/p&gt;

&lt;p&gt;For example, you can use a comparison operator, such as the greater than (&amp;gt;) operator, to find out if an expression (or a variable) is true or false:&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="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Outputs true, because 10 is greater than 9&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Store the Result in a Boolean Variable&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can also store the result of a comparison in a boolean variable:&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="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;boolean&lt;/span&gt; &lt;span class="n"&gt;isGreater&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;isGreater&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Outputs true&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;CRUD operations *&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;   Create: Create a new object or add an object             property to an existing object .&lt;/li&gt;
&lt;li&gt;    Read: Read any object existing property property&lt;/li&gt;
&lt;li&gt;    Update: Update or modify an object or the attribute values.&lt;/li&gt;
&lt;li&gt;    Delete: Delete or remove an entry from an object or the whole object.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Create Operation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This operation refers to the creation of an object or adding a new property to it. The following methods can be used to create the Object: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Using Object Constructor: It is a function that is used to create and initialize an object. The return value is assigned to a variable. The variable contains a reference to the new object.&lt;/li&gt;
&lt;li&gt;    Using Object literals: It is the list of key-value pairs separated by a comma ", " for creating an object.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Using Object Constructor&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;obj&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;Object&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// Using Object Literals&lt;/span&gt;
&lt;span class="nx"&gt;cosnt&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;key1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;value1&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;Read Operation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The read operation refers to reading and accessing the properties and values of an object. It can be done using the following methods:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;    Using Destructuring Assignment: It refers to the JavaScript syntax for unpacking the object values and assigning them to other variables.&lt;/li&gt;
&lt;li&gt;    Using Dot Notations: This syntax allows to access the object properties and items using a [dot] or ". " symbol.&lt;/li&gt;
&lt;li&gt;    Using Bracket Notation: It allows to access the object property using the property name inside the brackets "[ ]"
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="c1"&gt;// Creating new object&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rectangle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;width&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="na"&gt;area&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;function &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="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&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;width&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;rectangle&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;Rectangle length: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;length&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;Rectangle width: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;rectangle&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;width&lt;/span&gt;&lt;span class="dl"&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;Rectangle area: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;rectangle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;area&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;Update Operation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It means to access and modify an object's properties. It can be done using these methods:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Using Destructuring Assignment: It refers to the JavaScript syntax for unpacking the object values and assigning them to other variables.&lt;/li&gt;
&lt;li&gt;    Using Dot Notations: This syntax allows to access the object properties and items using a [dot] or ". " symbol.
&lt;/li&gt;
&lt;/ol&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;rectangle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;width&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="na"&gt;area&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;function &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="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&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;width&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;span class="c1"&gt;// Display Initial Area&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;Original Area: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;rectangle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;area&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;span class="c1"&gt;// Update Values&lt;/span&gt;
&lt;span class="nx"&gt;rectangle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;             &lt;span class="c1"&gt;// Usign dot notation &lt;/span&gt;
&lt;span class="nx"&gt;rectangle&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;width&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;           &lt;span class="c1"&gt;// Usign brackets&lt;/span&gt;

&lt;span class="c1"&gt;// Display Updated Area&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;Original Area: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;rectangle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;area&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;Delete Operation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Delete operation refers to the removal of an object property. It can be done as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Using Delete operator: Delete keyword is used to remove the object property mentioned after it.&lt;/li&gt;
&lt;li&gt;    Using Destructuring Assignment: It refers to the JavaScript syntax for unpacking the object values and assigning them to other variables.
&lt;/li&gt;
&lt;/ol&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;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;xyz&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;52&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;city&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;delhi&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="c1"&gt;// Display original object&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;Original object: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Using destructuring&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;newObj&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;obj&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;New object without age attribute: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;newObj&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


&lt;span class="c1"&gt;// Using delete operator&lt;/span&gt;
&lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;city&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;Original object after deleting city: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;obj&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;Boilerplate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, boilerplate refers to reusable, standard code configurations that developers use as a foundational starting point to spin up new applications or features without rewriting repetitive code from scratch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Boilerplate Code?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In programming languages(HTML/JAVA/Python), boilerplate code refers to reusable sections of code that are included in multiple places with little or no modification. This practice ensures consistency and efficiency across various parts of an application.&lt;/p&gt;

&lt;p&gt;For Example, In web development, an HTML boilerplate provides a standard template that includes essential elements like the doctype declaration, &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tags. This template is a foundation, which allows developers to focus on unique content without rewriting common structures.&lt;/p&gt;

&lt;p&gt;For absolute beginners, we recommend avoiding the use of boilerplate code while learning programming. Once you're familiar with the fundamentals, however, boilerplate code can be helpful for focusing on more important aspects of coding without getting bogged down by repetitive tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps to create Boilerplate&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Step 1:&lt;/strong&gt; Open your IDE's settings to start setting up a reusable snippet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Look for the "User Snippets" section, where you can save reusable code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Paste your boilerplate code into the snippet area for easy access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Save the snippet, allowing you to reuse this code in future projects effortlessly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Time-saving: It eliminates the need to rewrite common structures, making your coding process much faster.&lt;/li&gt;
&lt;li&gt;Error Reduction: By using tried-and-tested code, you reduce the chances of errors in the basic structure.&lt;/li&gt;
&lt;li&gt;Consistency: It ensures that your projects have a uniform structure, making your code more readable and maintainable.&lt;/li&gt;
&lt;li&gt;Easy Collaboration: If you're working in a team, using boilerplate code ensures everyone starts with the same structure, which makes collaboration smoother.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;ol&gt;
&lt;li&gt;    Provides a standardized set of code or configuration files as a starting point for new projects.&lt;/li&gt;
&lt;li&gt;    Typically includes essential components like directory structures, configuration settings, and common dependencies.&lt;/li&gt;
&lt;li&gt;    Aims to save time by reducing repetitive setup tasks and ensuring consistency across projects.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Refrence&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.w3schools.com/Java/java_booleans.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/Java/java_booleans.asp&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/javascript/how-to-perform-crud-operations-on-javascript-object/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/javascript/how-to-perform-crud-operations-on-javascript-object/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/html/what-is-boilerplate-code/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/html/what-is-boilerplate-code/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Function in JS</title>
      <dc:creator>Ezhil Arasan</dc:creator>
      <pubDate>Wed, 17 Jun 2026 07:27:03 +0000</pubDate>
      <link>https://dev.to/ezhil_arasan_d1230a486501/function-in-js-3209</link>
      <guid>https://dev.to/ezhil_arasan_d1230a486501/function-in-js-3209</guid>
      <description>&lt;p&gt;&lt;strong&gt;what is function?&lt;/strong&gt;&lt;br&gt;
A JavaScript function is a reusable block of code designed to perform a specific task. You write the code once, and you can run (or "invoke") it as many times as you need throughout your program.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Use Functions?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Functions help you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Reuse code (write once, run many times)&lt;/li&gt;
&lt;li&gt;    Organize code into smaller parts&lt;/li&gt;
&lt;li&gt;    Make code easier to read and maintain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What Does a Function Look Like?&lt;/strong&gt;&lt;br&gt;
A function can be created with the function keyword, a name, and parentheses.&lt;/p&gt;

&lt;p&gt;The code to run is written inside curly brackets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;A one liner:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function sayHello() { return "Hello World"; }&lt;/code&gt;&lt;br&gt;
or more common:&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;sayHello&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Calling a Function&lt;/strong&gt;&lt;br&gt;
A JavaScript function runs when it is called.&lt;br&gt;
To call a function, write the name followed by parentheses like name().&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Function Invocation&lt;/strong&gt;&lt;br&gt;
The code inside a function is NOT executed when the function is defined.&lt;/p&gt;

&lt;p&gt;The code inside a function will execute when "something" invokes the function:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;    When it is called from JavaScript code&lt;/li&gt;
&lt;li&gt;    When an event occurs (a user clicks a button)&lt;/li&gt;
&lt;li&gt;    Automatically (self invoked)
It is common to use the term invoke, because a function can be invoked without being called.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is also common to use say:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;    call a function&lt;/li&gt;
&lt;li&gt;    call upon a function&lt;/li&gt;
&lt;li&gt;    start a function&lt;/li&gt;
&lt;li&gt;    execute a function&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Examples&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The function below returns the text "Hello World".&lt;br&gt;
But it will not run before you call it.&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;sayHello&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Using the Returned Value&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a function returns a value, you can store the value in a variable.&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;sayHello&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sayHello&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;Displaying the Result&lt;/strong&gt;&lt;br&gt;
You can display the returned value in many ways, for example using console.log() or HTML.&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;sayHello&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&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="nf"&gt;sayHello&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;JavaScript Function Parameters&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Parameters (Function Input)&lt;/strong&gt;&lt;br&gt;
Parameters allow you to pass (send) values to a function.&lt;br&gt;
Parameters are listed inside the parentheses in the function definition.&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;multiply&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;multiply&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="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;&lt;strong&gt;Functions with Multiple Parameters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can add as many parameters as you want, separated by commas.&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;fullName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;lastName&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;firstName&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;lastName&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;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;fullName&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;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Doe&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;&lt;strong&gt;Parameters vs. Arguments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, function parameters and arguments are distinct concepts:&lt;br&gt;
Parameters are the names listed in the function definition.&lt;br&gt;
Arguments are the real values passed to, and received by the function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parameter Rules&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript function definitions do not specify data types for parameters.&lt;br&gt;
JavaScript functions do not perform type checking on the arguments.&lt;br&gt;
JavaScript functions do not check the number of arguments received.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Function Arguments&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;multiply&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;multiply&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="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;In the example above:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;    a and b are parameters&lt;/li&gt;
&lt;li&gt;    4 and 5 are arguments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The argument 4 is assigned to the parameter a.&lt;br&gt;
The argument 5 is assigned to the parameter b.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Arguments Object&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript functions have a built-in object called the arguments object.&lt;/p&gt;

&lt;p&gt;The argument object contains an array of the arguments used when the function was called (invoked).&lt;/p&gt;

&lt;p&gt;This way you can simply use a function to find (for instance) the highest value in a list of numbers:&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;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;findMax&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="mi"&gt;123&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;115&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;44&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;88&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;findMax&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;max&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="kc"&gt;Infinity&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&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;0&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="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&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;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arguments&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="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;max&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;max&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arguments&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;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;max&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;Arguments Can Be Variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Arguments do not have to be values. They can also be variables.&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;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&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;y&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;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;multiply&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="nf"&gt;multiply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&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;JavaScript Function Return&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Returning Values from Functions&lt;br&gt;
A function can return a value back to the code that called it.&lt;br&gt;
The return statement is used to send a value out of a function.&lt;br&gt;
The return Statement&lt;br&gt;
When a function reaches a return statement, the function stops executing.&lt;/p&gt;

&lt;p&gt;The value after the return keyword is sent back to the caller.&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;sayHello&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sayHello&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;Return Values&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A function can return any type of value (not only numbers).&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;fullName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;lastName&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;firstName&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;lastName&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;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;fullName&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;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Doe&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;&lt;strong&gt;Refrence&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.w3schools.com/js/js_function_expressions.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/js/js_function_expressions.asp&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>JavaScript</title>
      <dc:creator>Ezhil Arasan</dc:creator>
      <pubDate>Tue, 16 Jun 2026 19:11:02 +0000</pubDate>
      <link>https://dev.to/ezhil_arasan_d1230a486501/javascript-2l18</link>
      <guid>https://dev.to/ezhil_arasan_d1230a486501/javascript-2l18</guid>
      <description>&lt;p&gt;&lt;strong&gt;JavaScript Syntax&lt;/strong&gt;&lt;br&gt;
JavaScript syntax refers to the rules and conventions dictating how code is structured and arranged within the JavaScript programming language. This includes statements, expressions, variables, functions, operators, and control flow constructs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;console.log("Basic Print method in JavaScript");&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Operators are for Mathematical and Logical Computations&lt;/p&gt;

&lt;p&gt;The Assignment Operator = assigns values&lt;/p&gt;

&lt;p&gt;The Addition Operator + adds values&lt;/p&gt;

&lt;p&gt;The Multiplication Operator * multiplies values&lt;/p&gt;

&lt;p&gt;The Comparison Operator &amp;gt; compares values&lt;/p&gt;

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

&lt;p&gt;The Assignment Operator (=) assigns a value to a variable:&lt;br&gt;
// Assign the value 5 to x&lt;br&gt;
let x = 5;&lt;br&gt;
// Assign the value 2 to y&lt;br&gt;
let y = 2;&lt;br&gt;
// Assign the value x + y to z:&lt;br&gt;
let z = x + y;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Addition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Addition Operator (+) adds numbers:&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;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&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;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&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;z&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&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;JavaScript Multiplication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Multiplication Operator (*) multiplies numbers:&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;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&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;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&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;z&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F3ftvdfoh95m5ry1y54h2.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%2F3ftvdfoh95m5ry1y54h2.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Conditionals&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Conditional Statements&lt;/p&gt;

&lt;p&gt;Conditional Statements allow us to perform different actions for different conditions.&lt;/p&gt;

&lt;p&gt;Conditional statements run different code depending on true or false conditions.&lt;/p&gt;

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

&lt;ol&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;/ol&gt;

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

&lt;ul&gt;
&lt;li&gt;    Use if to specify a code block to be executed, if a specified condition is true&lt;/li&gt;
&lt;li&gt;    Use else to specify a code block to be executed, if the same condition is false&lt;/li&gt;
&lt;li&gt;    Use else if to specify a new condition to test, if the first condition is false&lt;/li&gt;
&lt;li&gt;    Use switch 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 if Statement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use if to specify a code block to be executed, if a specified condition is true.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// code to execute if the condition is true&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;The else Statement&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Syntax&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// code to execute if the condition is true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// code to execute if the condition is false&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;The else if Statement&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Syntax&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;condition1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// code to execute if condition1 is true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;condition2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// code to execute if the condition1 is false and condition2 is true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// code to execute if the condition1 is false and condition2 is false&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="nx"&gt;The&lt;/span&gt; &lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="nx"&gt;Statement&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;

&lt;span class="nx"&gt;Use&lt;/span&gt; &lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;specify&lt;/span&gt; &lt;span class="nx"&gt;many&lt;/span&gt; &lt;span class="nx"&gt;alternative&lt;/span&gt; &lt;span class="nx"&gt;code&lt;/span&gt; &lt;span class="nx"&gt;blocks&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;be&lt;/span&gt; &lt;span class="nx"&gt;executed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="nx"&gt;Syntax&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;switch(expression) {&lt;br&gt;
  case x:&lt;br&gt;
    // code block&lt;br&gt;
    break;&lt;br&gt;
  case y:&lt;br&gt;
    // code block&lt;br&gt;
    break;&lt;br&gt;
  default:&lt;br&gt;
    // code block&lt;br&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;br&gt;
&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;condition ? expression1 : expression2&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Variables and Datatypes in JavaScript</title>
      <dc:creator>Ezhil Arasan</dc:creator>
      <pubDate>Wed, 03 Jun 2026 07:08:46 +0000</pubDate>
      <link>https://dev.to/ezhil_arasan_d1230a486501/variables-and-datatypes-in-javascript-lok</link>
      <guid>https://dev.to/ezhil_arasan_d1230a486501/variables-and-datatypes-in-javascript-lok</guid>
      <description>&lt;p&gt;Variables and Data Types in JavaScript are fundamental concepts used to store and manage data in a program. They define how information is declared, stored, and manipulated during execution.&lt;br&gt;
    &lt;strong&gt;Variables:&lt;/strong&gt; Declared using var, let, and const to store data values.&lt;br&gt;
    &lt;strong&gt;Primitive Data Types:&lt;/strong&gt; Includes Number, String, Boolean, Null, Undefined, BigInt, and Symbol.&lt;br&gt;
    &lt;strong&gt;Non-Primitive Data Types:&lt;/strong&gt; Includes Object, Array, and Function used to store complex data. &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%2F4kfp18d1ycydzkomeona.webp" 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%2F4kfp18d1ycydzkomeona.webp" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A variable is like a container that holds data that can be reused or updated later in the program. In JavaScript, variables are declared using the keywords var, let, or const.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. var Keyword&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The var keyword is used to declare a variable. It has a function-scoped or globally-scoped behaviour.&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;var&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&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;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;n&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// reassigning is allowed&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;n&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. let Keyword&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The let keyword is introduced in ES6, has block scope and cannot be re-declared in the same scope.&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;n&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Value can be updated&lt;/span&gt;
&lt;span class="c1"&gt;// let n = 15; //can not redeclare&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;n&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;3. const Keyword&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The const keyword declares variables that cannot be reassigned. It's block-scoped as well.&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;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// n = 200; This will throw an error&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;n&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;The Variable Name&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are certain rules that apply when naming a variable. Some rules are programming-language specific, others apply to all programming languages:&lt;br&gt;
    A variable name cannot contain spaces.&lt;br&gt;
    A variable name cannot start with a number.&lt;br&gt;
    A variable name cannot be a reserved word like if, else, for, function etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Difference between static and non-static variables in Java&lt;/strong&gt;&lt;br&gt;
In Java, variables are mainly categorized into two main types based on their working and memory allocation, and these two variables are static variables and non-static variables. The main difference between them is listed below:&lt;br&gt;
    &lt;strong&gt;Static variables:&lt;/strong&gt; These are variables that are shared among all the instances of a class.&lt;br&gt;
    &lt;strong&gt;Non-static variables:&lt;/strong&gt; These are variables that belong to each individual instance of a class.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java Static Variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a variable is declared as static, then a single copy of the variable is created and shared among all objects at a class level. Static variables are essentially, global variables.&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="c1"&gt;// Java program to demonstrate execution&lt;/span&gt;
&lt;span class="c1"&gt;// of static blocks and variables&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Geeks&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// static variable&lt;/span&gt;
    &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;m1&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;

    &lt;span class="c1"&gt;// static block&lt;/span&gt;
    &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Inside static block"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// static method&lt;/span&gt;
    &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;m1&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
    &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"from m1"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Value of a : "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"from main"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&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;Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;from m1&lt;br&gt;
Inside static block&lt;br&gt;
Value of a : 20&lt;br&gt;
from main&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java Non-static variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Non-static variables are variables that belongs to a specified object of a class, it is also known as instance variable. These variables are declared outside of a method, constructor or block. Each object created from the class gets its own separate copy of these variables.&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="c1"&gt;// Java program to demonstrates &lt;/span&gt;
&lt;span class="c1"&gt;// the working of non-static variables&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Geeks&lt;/span&gt; 
&lt;span class="o"&gt;{&lt;/span&gt;  
    &lt;span class="c1"&gt;// declaration of non-static variables.&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; 
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;division&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;    

    &lt;span class="c1"&gt;// Constructor that initialize non-static variable.&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;Geeks&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;sname&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;  
    &lt;span class="o"&gt;{&lt;/span&gt;  
        &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sname&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;  
    &lt;span class="o"&gt;}&lt;/span&gt;  

    &lt;span class="c1"&gt;//Method to initialize non-static variable. &lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;setDiv&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;sdiv&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;  
    &lt;span class="o"&gt;{&lt;/span&gt;  
        &lt;span class="n"&gt;division&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sdiv&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;  
    &lt;span class="o"&gt;}&lt;/span&gt;  

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;setAge&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;sage&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;  
    &lt;span class="o"&gt;{&lt;/span&gt;  
        &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sage&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;  
    &lt;span class="o"&gt;}&lt;/span&gt;  

    &lt;span class="c1"&gt;// Method to display the values&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;printstud&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;  
    &lt;span class="o"&gt;{&lt;/span&gt;  
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Student Name: "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;);&lt;/span&gt;  
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Student Division: "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;division&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;   
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Student Age: "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;  
    &lt;span class="o"&gt;}&lt;/span&gt;  

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;[])&lt;/span&gt;  
    &lt;span class="o"&gt;{&lt;/span&gt;  
        &lt;span class="nc"&gt;Geeks&lt;/span&gt; &lt;span class="n"&gt;g&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;Geeks&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Monica"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;  
        &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setAge&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;  
        &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setDiv&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"B"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;  
        &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;printstud&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;  
    &lt;span class="o"&gt;}&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;Output&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
Student Name: Monica&lt;br&gt;
Student Division: B&lt;br&gt;
Student Age: 14&lt;/code&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%2Fhfrcb1qgqmcmd649nby0.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%2Fhfrcb1qgqmcmd649nby0.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript supports various datatypes, which can be broadly categorized into primitive and non-primitive types.&lt;br&gt;
Primitive Datatypes&lt;/p&gt;

&lt;p&gt;Primitive datatypes represent single values and are immutable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Number:&lt;/strong&gt; Represents numeric values (integers and decimals).&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;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;42&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;pi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.14&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. String:&lt;/strong&gt; Represents text enclosed in single or double quotes.&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;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello, World!&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;&lt;strong&gt;3. Boolean:&lt;/strong&gt; Represents a logical value (true or false).&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;bool&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&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. Undefined:&lt;/strong&gt; A variable that has been declared but not assigned a 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;let&lt;/span&gt; &lt;span class="nx"&gt;notAssigned&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;notAssigned&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;5. Null:&lt;/strong&gt; Represents an intentional absence of any 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;let&lt;/span&gt; &lt;span class="nx"&gt;empty&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&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;6. Symbol:&lt;/strong&gt; Represents unique and immutable values, often used as object keys.&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;sym&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Symbol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;unique&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;&lt;strong&gt;7. BigInt:&lt;/strong&gt; Represents integers larger than Number.MAX_SAFE_INTEGER.&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;bigNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;123456789012345678901234567890&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;**&lt;br&gt;
Non-Primitive Datatypes**&lt;/p&gt;

&lt;p&gt;Non-primitive types are objects and can store collections of data or more complex entities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Object:&lt;/strong&gt; Represents key-value pairs.&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;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Amit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;25&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. Array:&lt;/strong&gt; Represents an ordered list of values.&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;a&lt;/span&gt; &lt;span class="o"&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;red&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;green&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;blue&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;&lt;strong&gt;3. Function:&lt;/strong&gt; Represents reusable blocks of 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;function&lt;/span&gt; &lt;span class="nf"&gt;fun&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;GeeksforGeeks&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Bits and Bytes in Programming&lt;/strong&gt;&lt;br&gt;
Bits and bytes are the smallest units of data in a computer.&lt;br&gt;
A bit is a single binary digit, with a value of either 0 or 1.&lt;br&gt;
A byte is a group of 8 bits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a Bit?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A bit is the smallest possible unit of data in a computer.&lt;br&gt;
One bit holds a value of either 0 or 1.&lt;br&gt;
Bits are stored in different ways:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;In computer memory, a bit is stored as electrical voltage, where a voltage above a certain threshold represents a 1, and a voltage below that threshold represents a 0.
In hard disk drives, a bit is stored as magnetism, where an area magnetized in one orientation represents a 1, and a magnetized area in the opposite orientation represents a 0.
In CDs, DVDs, and Blu-ray discs, a bit is stored as either a pit, or a flat area. A pit is an area where the surface is lower than the surrounding surface, and that represents a 1. A flat area is when there is no pit, and that represents a 0.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;What is a Byte?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A byte is a group of 8 bits, like 10001011 for example.&lt;/p&gt;

&lt;p&gt;Each bit can be either 0 or 1, and with 8 bits in a byte, there are 28 = 256 different values a byte can have.&lt;/p&gt;

&lt;p&gt;But simply storing just one bit is not very useful. We need to store more bits together to represent larger amounts of data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Storing Groups of Bytes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Like we have seen, it is possible to use a single byte to store a single character, a number, or a color.&lt;/p&gt;

&lt;p&gt;But normally, modern computers use more than one byte to store something.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Storage Units&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When storing data, we can use different units to measure the size of the data.&lt;/p&gt;

&lt;p&gt;In data measurement units, the capital letter "B" is used to represent "byte", and the lower case letter "b" is used to represent "bit".&lt;/p&gt;

&lt;p&gt;Storing many bytes, we use units:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Bytes (B)
Kilobytes (kB)
Megabytes (MB)
Gigabytes (GB)
Terabytes (TB)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The International System of Units (SI) defines the prefixes:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kilo- (k), meaning 1 000
mega- (M), meaning 1 000 000
giga- (G), meaning 1 000 000 000
tera- (T), meaning 1 000 000 000 000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Refrence&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/javascript/javascript-tutorial/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/javascript/javascript-tutorial/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.w3schools.com/programming/prog_binary_numbers.php" rel="noopener noreferrer"&gt;https://www.w3schools.com/programming/prog_binary_numbers.php&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.w3schools.com/programming/prog_variables.php" rel="noopener noreferrer"&gt;https://www.w3schools.com/programming/prog_variables.php&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/javascript/variables-datatypes-javascript/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/javascript/variables-datatypes-javascript/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/java/difference-between-static-and-non-static-variables-in-java/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/java/difference-between-static-and-non-static-variables-in-java/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Java Script</title>
      <dc:creator>Ezhil Arasan</dc:creator>
      <pubDate>Wed, 03 Jun 2026 06:23:47 +0000</pubDate>
      <link>https://dev.to/ezhil_arasan_d1230a486501/java-script-l3a</link>
      <guid>https://dev.to/ezhil_arasan_d1230a486501/java-script-l3a</guid>
      <description>&lt;p&gt;&lt;strong&gt;What Can JavaScript Do?&lt;/strong&gt;&lt;br&gt;
JavaScript is the programming language of the web.&lt;br&gt;
It can calculate, manipulate and validate data.&lt;br&gt;
It can update and change both HTML and CSS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Can Change HTML Content&lt;/strong&gt;&lt;br&gt;
One of many JavaScript HTML methods is getElementById().&lt;br&gt;
The example below "finds" an HTML element (with id="demo"), and changes the element content (innerHTML) to "Hello JavaScript":&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript in &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can place any number of scripts in an HTML document.&lt;br&gt;
Scripts can be placed in the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;, or in the&lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section of an HTML page, or in both.&lt;/p&gt;

&lt;p&gt;JavaScript in &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In this example, a JavaScript function is placed in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section of an HTML page.&lt;/p&gt;

&lt;p&gt;The function is invoked (called) when a button is clicked:&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="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;myFunction&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;demo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Paragraph changed.&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="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Demo JavaScript in Head&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"demo"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;A Paragraph&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"myFunction()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Try it&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;JavaScript in &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this example, a JavaScript function is placed in the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; section of an HTML page.&lt;/p&gt;

&lt;p&gt;The function is invoked (called) when a button is clicked:&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="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Demo JavaScript in Body&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"demo"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;A Paragraph&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"myFunction()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Try it&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;myFunction&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;demo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Paragraph changed.&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="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Java script&lt;/strong&gt;&lt;br&gt;
JavaScript is a programming language used to create dynamic content for websites. It is a lightweight, cross-platform, and single-threaded programming language. It's an interpreted language that executes code line by line, providing more flexibility.&lt;br&gt;
    &lt;strong&gt;Client Side:&lt;/strong&gt;  On the client side, JavaScript works along with HTML and CSS. HTML adds structure to a web page, CSS styles it, and JavaScript brings it to life by allowing users to interact with elements on the page, such as actions on clicking buttons, filling out forms, and showing animations. JavaScript on the client side is directly executed in the user's browser.&lt;br&gt;
    &lt;strong&gt;Server Side:&lt;/strong&gt;  On the Server side (on Web Servers), JavaScript is used to access databases, file handling, and security features to send responses, to browsers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Learn JavaScript?&lt;/strong&gt;&lt;br&gt;
    1) Core language for web development, enabling dynamic and interactive features in websites with fewer lines of code.&lt;br&gt;
    2) Highly in demand, offering many job opportunities in Frontend, Backend (Node.js), and Full Stack Development.&lt;br&gt;
    3) Supports powerful frameworks and libraries like React, Angular, Vue.js, Node.js, and Express.js, widely used in modern web applications.&lt;br&gt;
    4) Object-oriented and event-driven language, ideal for building scalable and responsive applications.&lt;br&gt;
    5) Cross-platform and runs directly in all modern web browsers without the need for installation.&lt;br&gt;
    6) Major companies like Google, Facebook, and Amazon use JavaScript in their tech stacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Hello World Program&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mostly browsers can run JavaScript directly, so there's no need to install a compiler. However, the built-in browser console isn’t very beginner-friendly. That’s why we’ve added an online editor below to help you get started easily.&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World!&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;&lt;strong&gt;Refrence&lt;/strong&gt;&lt;br&gt;
 &lt;a href="https://www.geeksforgeeks.org/javascript/variables-datatypes-javascript/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/javascript/variables-datatypes-javascript/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.w3schools.com/js/js_whereto.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/js/js_whereto.asp&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Selectors</title>
      <dc:creator>Ezhil Arasan</dc:creator>
      <pubDate>Wed, 03 Jun 2026 06:00:40 +0000</pubDate>
      <link>https://dev.to/ezhil_arasan_d1230a486501/selectors-3pe3</link>
      <guid>https://dev.to/ezhil_arasan_d1230a486501/selectors-3pe3</guid>
      <description>&lt;p&gt;CSS selectors&lt;/p&gt;

&lt;p&gt;The CSS selectors module defines the patterns to select elements to which a set of CSS rules are then applied along with their specificity. The CSS selectors module provides us with more than 60 selectors and five combinators. Other modules provide additional pseudo-class selectors and pseudo-elements.&lt;/p&gt;

&lt;p&gt;In CSS, selectors are patterns used to match, or select, the elements you want to style. Selectors are also used in JavaScript to enable selecting the DOM nodes to return as a NodeList.&lt;/p&gt;

&lt;p&gt;Selectors, whether used in CSS or JavaScript, enable targeting HTML elements based on their type, attributes, current states, and even position in the DOM. Combinators allow you to be more precise when selecting elements by enabling selecting elements based on their relationship to other elements.&lt;/p&gt;

&lt;p&gt;Selectors&lt;br&gt;
    &lt;code&gt;:active&lt;br&gt;
    :any-link&lt;br&gt;
    :autofill&lt;br&gt;
    :buffering&lt;br&gt;
    :checked&lt;br&gt;
    :default&lt;br&gt;
    :defined&lt;br&gt;
    :dir()&lt;br&gt;
    :disabled&lt;br&gt;
    :empty&lt;br&gt;
    :enabled&lt;br&gt;
    :first-child&lt;br&gt;
    :first-of-type&lt;br&gt;
    :focus&lt;br&gt;
    :focus-visible&lt;br&gt;
    :focus-within&lt;br&gt;
    :fullscreen&lt;br&gt;
    :future&lt;br&gt;
    :has()&lt;br&gt;
    :hover&lt;br&gt;
    :in-range&lt;br&gt;
    :indeterminate&lt;br&gt;
    :interest-source&lt;br&gt;
    :interest-target&lt;br&gt;
    :invalid&lt;br&gt;
    :is()&lt;br&gt;
    :lang()&lt;br&gt;
    :last-child&lt;br&gt;
    :last-of-type&lt;br&gt;
    :link&lt;br&gt;
    :matches() (obsolete legacy selector alias for :is())&lt;br&gt;
    :modal&lt;br&gt;
    :muted&lt;br&gt;
    :not()&lt;br&gt;
    :nth-child()&lt;br&gt;
    :nth-of-type()&lt;br&gt;
    :nth-last-child()&lt;br&gt;
    :nth-last-of-type()&lt;br&gt;
    :only-child&lt;br&gt;
    :only-of-type&lt;br&gt;
    :open&lt;br&gt;
    :optional&lt;br&gt;
    :out-of-range&lt;br&gt;
    :past&lt;br&gt;
    :paused&lt;br&gt;
    :picture-in-picture&lt;br&gt;
    :placeholder-shown&lt;br&gt;
    :playing&lt;br&gt;
    :popover-open&lt;br&gt;
    :read-only&lt;br&gt;
    :read-write&lt;br&gt;
    :required&lt;br&gt;
    :root&lt;br&gt;
    :scope&lt;br&gt;
    :seeking&lt;br&gt;
    :stalled&lt;br&gt;
    :target&lt;br&gt;
    :user-invalid&lt;br&gt;
    :user-valid&lt;br&gt;
    :valid&lt;br&gt;
    :visited&lt;br&gt;
    :volume-locked&lt;br&gt;
    :where()&lt;br&gt;
    :-webkit- pseudo-classes&lt;br&gt;
    Attribute selectors&lt;br&gt;
    Class selector&lt;br&gt;
    ID selectors&lt;br&gt;
    Type selectors&lt;br&gt;
    Universal selectors&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The CSS selectors module also introduces the &lt;code&gt;:blank&lt;/code&gt;, &lt;code&gt;:current&lt;/code&gt;, and &lt;code&gt;:local-link&lt;/code&gt; pseudo-classes. Currently, no browsers support these features.&lt;/p&gt;

&lt;p&gt;Terms&lt;br&gt;
    1)Pseudo-class glossary term&lt;br&gt;
    2)Functional pseudo-classes&lt;br&gt;
    3)Combinators&lt;br&gt;
    4)Simple selector&lt;br&gt;
    5)Compound selector&lt;br&gt;
    6)Complex selector&lt;br&gt;
    7)Relative selector&lt;br&gt;
    8)Specificity&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Media Queries</title>
      <dc:creator>Ezhil Arasan</dc:creator>
      <pubDate>Fri, 29 May 2026 02:37:12 +0000</pubDate>
      <link>https://dev.to/ezhil_arasan_d1230a486501/media-queries-3f4b</link>
      <guid>https://dev.to/ezhil_arasan_d1230a486501/media-queries-3f4b</guid>
      <description>&lt;p&gt;&lt;strong&gt;CSS Media Queries&lt;/strong&gt;&lt;br&gt;
CSS media queries allow you to apply styles based on the characteristics of a device or the environment displaying the web page.&lt;br&gt;
CSS media queries are essential for creating responsive web pages.&lt;br&gt;
The CSS &lt;code&gt;@media&lt;/code&gt; rule is used to add media queries to your style sheet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Media Query Syntax&lt;/strong&gt;&lt;br&gt;
A media query consists of an optional media-type and one or more media-features, which resolve to either true or false.&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="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;not&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;media-type&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;media-feature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;media-feature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* CSS rules to apply */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The media-type is optional. However, if you use not, you must also specify a media-type.&lt;/p&gt;

&lt;p&gt;The result of a media query is true if the specified media-type matches the type of device, and all media-features are true. When a media query is true, the corresponding style rules are applied, following the normal cascading rules.&lt;/p&gt;

&lt;p&gt;Meaning of the not and and keywords:&lt;/p&gt;

&lt;p&gt;not: This optional keyword inverts the meaning of the entire media query.&lt;/p&gt;

&lt;p&gt;and: This keyword combines a media-type and one or more media-features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS Media Types&lt;/strong&gt;&lt;br&gt;
The optional media type specifies the type of media the styles are for. If media type is omitted, it will be set to "all".&lt;/p&gt;

&lt;p&gt;all     - Used for all media type devices&lt;br&gt;
print   - Used for print preview mode&lt;br&gt;
screen  - Used for computer screens, tablets, and smart-phones&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS Media Features&lt;/strong&gt;&lt;br&gt;
The media feature specifies a specific characteristic of the device.&lt;/p&gt;

&lt;p&gt;Here are some commonly used media features:&lt;/p&gt;

&lt;p&gt;max-height            - Maximum height of the viewport&lt;br&gt;
min-height            - Minimum height of the viewport&lt;br&gt;
height                - Height of the viewport (including scrollbar)&lt;br&gt;
max-width             - Maximum width of the viewport&lt;br&gt;
min-width             - Minimum width of the viewport&lt;br&gt;
width                 - Width of the viewport (including scrollbar)&lt;br&gt;
orientation           - Orientation of the viewport&lt;br&gt;&lt;br&gt;
resolution            -  Screen resolution&lt;br&gt;
prefers-color-scheme  - User's preferred color scheme &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using media queries&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Media queries allow you to apply CSS styles depending on a device's media type (such as print vs. screen) or other features or characteristics such as screen resolution or orientation, aspect ratio, browser viewport width or height, user preferences such as preferring reduced motion, data usage, or transparency.&lt;/p&gt;

&lt;p&gt;Media queries are used for the following:&lt;br&gt;
    To conditionally apply styles with the CSS &lt;code&gt;@media&lt;/code&gt;, &lt;code&gt;@custom-media&lt;/code&gt; and &lt;code&gt;@import&lt;/code&gt; at-rules.&lt;br&gt;
    To target specific media for the &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;source&amp;gt;&lt;/code&gt;, and other HTML elements with the &lt;code&gt;media=&lt;/code&gt;or&lt;code&gt;sizes="&lt;/code&gt; attributes.&lt;br&gt;
    To test and monitor media states using the&lt;code&gt;Window.matchMedia()&lt;/code&gt;and &lt;code&gt;EventTarget.addEventListener()&lt;/code&gt; methods.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A media query is composed of an optional media type and any number of media feature expressions, which may optionally be combined in various ways using logical operators. Media queries are case-insensitive.&lt;br&gt;
   Media types define the broad category of device for which the media query applies: all, print, screen.&lt;br&gt;
    The type is optional (assumed to be all) except when using the only logical operator.&lt;br&gt;
    Media features describe a specific characteristic of the user agent, output device, or environment:&lt;br&gt;
        any-hover&lt;br&gt;
        any-pointer&lt;br&gt;
        aspect-ratio&lt;br&gt;
        color&lt;br&gt;
        color-gamut&lt;br&gt;
        color-index&lt;br&gt;
        device-aspect-ratio&lt;br&gt;
        device-height&lt;br&gt;
        device-posture&lt;br&gt;
        device-width&lt;br&gt;
        display-mode&lt;br&gt;
        dynamic-range&lt;br&gt;
        forced-colors&lt;br&gt;
        grid&lt;br&gt;
        height&lt;br&gt;
        hover&lt;br&gt;
        inverted-colors&lt;br&gt;
        monochrome&lt;br&gt;
        orientation&lt;br&gt;
        overflow-block&lt;br&gt;
        overflow-inline&lt;br&gt;
        pointer&lt;br&gt;
        prefers-color-scheme&lt;br&gt;
        prefers-contrast&lt;br&gt;
        prefers-reduced-motion&lt;br&gt;
        prefers-reduced-transparency&lt;br&gt;
        resolution&lt;br&gt;
        scripting&lt;br&gt;
        update&lt;br&gt;
        video-dynamic-range&lt;br&gt;
        width&lt;br&gt;
    For example, the &lt;code&gt;hover&lt;/code&gt; feature allows a query to check whether the device supports hovering over elements. Media feature expressions test for their presence or value, and are entirely optional. Each media feature expression must be surrounded by parentheses.&lt;br&gt;
    Logical operators can be used to compose a complex media query: &lt;code&gt;not&lt;/code&gt;, &lt;code&gt;and&lt;/code&gt;, and &lt;code&gt;only&lt;/code&gt;. You can also combine multiple media queries into a single rule by separating them with commas.&lt;br&gt;
    A media query computes to &lt;code&gt;true&lt;/code&gt; when the media type (if specified) matches the device on which a document is being displayed and all media feature expressions compute as true. Queries involving unknown media types are always false.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Targeting media types&lt;/strong&gt;&lt;br&gt;
Media types describe the general category of a given device. Although websites are commonly designed with screens in mind, you may want to create styles that target special devices such as printers or audio-based screen readers. For example, this CSS targets printers:&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="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;print&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* … */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also target multiple devices. For instance, this &lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; rule uses two media queries to target both screen and print devices:&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="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;print&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* … */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See media types for the list of available media types. Because media types describe devices in very broad terms, most of the originally-defined media types were deprecated, with just &lt;code&gt;screen&lt;/code&gt;, &lt;code&gt;print&lt;/code&gt;, and &lt;code&gt;all&lt;/code&gt; remaining. To target more specific attributes, use media features instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Targeting media features&lt;/strong&gt;&lt;br&gt;
Media features describe the specific characteristics of a given user agent, output device, or environment. For instance, you can apply specific styles to widescreen monitors, computers that use mice, or devices that are being used in low-light conditions. This example applies styles when the user's primary input mechanism (such as a mouse) can hover over elements:&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="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hover&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;hover&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* … */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Media features are either range or discrete.&lt;/p&gt;

&lt;p&gt;Discrete features take their value from an enumerated set of possible keyword values. For example, the discrete orientation feature accepts either landscape or portrait.&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="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;print&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;orientation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;portrait&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* … */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Many range features can be prefixed with "min-" or "max-" to express "minimum condition" or "maximum condition" constraints. For example, this CSS will apply styles only if your browser's viewport width is equal to or narrower than 1250px:&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="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1250px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&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;Refrence&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.w3schools.com/css/css3_mediaqueries.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/css/css3_mediaqueries.asp&lt;/a&gt;&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Media_queries/Using#syntax" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Media_queries/Using#syntax&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>css</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Server/404</title>
      <dc:creator>Ezhil Arasan</dc:creator>
      <pubDate>Sat, 23 May 2026 17:43:55 +0000</pubDate>
      <link>https://dev.to/ezhil_arasan_d1230a486501/server404-6dd</link>
      <guid>https://dev.to/ezhil_arasan_d1230a486501/server404-6dd</guid>
      <description>&lt;p&gt;&lt;strong&gt;what is server?&lt;/strong&gt;&lt;br&gt;
A server is a hardware device or software that processes requests sent over a network and replies to them. A client is the device that submits a request and waits for a response from the server. The computer system that accepts requests for online files and transmits those files to the client is referred to as a server in the context of the Internet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Server&lt;/strong&gt;&lt;br&gt;
A Server is a program or a device that provides functionality for called clients which are other programs or devices. This architecture is called the client-server model.&lt;/p&gt;

&lt;p&gt;A single overall computation is distributed across multiple processes or devices. Servers can provide various functionalities called services. These services include sharing data or resources among multiple clients or performing computations for a client. Multiple clients can be served by a single server, and a single client can use multiple servers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Characteristics of a Server&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Provides Services:&lt;/strong&gt; Servers perform specific tasks like hosting websites, managing emails, storing files, or running applications. These services can vary depending on the server’s purpose. Each type of server performs a specific, well-defined task and is optimized for that role.&lt;br&gt;
        &lt;strong&gt;File Server:&lt;/strong&gt; Stores and lets users share files over a network.&lt;br&gt;
        &lt;strong&gt;Mail Server:&lt;/strong&gt; Sends, receives, and stores emails (e.g., Microsoft Exchange, Postfix).&lt;br&gt;
        &lt;strong&gt;Database Server:&lt;/strong&gt; Provides database access and handles queries (e.g., MySQL, Oracle).&lt;br&gt;
        &lt;strong&gt;Game Server:&lt;/strong&gt; Hosts online multiplayer games and syncs game data between players.&lt;br&gt;
        &lt;strong&gt;Web Server:&lt;/strong&gt; Serves web pages to browsers (e.g., Apache, Nginx)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Components of Server&lt;/strong&gt;&lt;br&gt;
    Specific components will differ based on the form factor and function of a given server, but common components are covered here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hardware:&lt;/strong&gt; The dedicated server's central processing unit (CPU) , memory , storage device , network interfaces, and the server chassis are all included in this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network Connectivity:&lt;/strong&gt; Over a local area network (LAN) , wide area network (WAN) , or the internet , server programs connect to the network architecture and communicate with client devices. To offer redundancy and accommodate various network setups, certain server form factors contain several network interfaces.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Server OS:&lt;/strong&gt; This operating system (OS) was created with a particular kind of client/server environment in mind.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Management and Monitoring Tools:&lt;/strong&gt; Instruments for remote management and performance monitoring are frequently included with servers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Server Software:&lt;/strong&gt; This server software supports a particular use case. Software for email servers, web servers, and database servers are a few examples.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;High-Availability Features:&lt;/strong&gt;  High-availability (HA) capabilities are included on some servers to reduce downtime and guarantee continuous operation. This involves having access to numerous storage systems, backup power supply and network interfaces, and configuration management tools that enable automatic failover and load balancing . &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Types of Servers and Their Applications&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Application Server&lt;/strong&gt;&lt;br&gt;
These servers host web apps (computer programs that run inside a web browser) allowing users in the network to run and use them preventing the installation of a copy on their own computers. These servers need not be part of the World Wide Web. Their clients are computers with a web browser. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Catalog Server&lt;/strong&gt;&lt;br&gt;
These servers maintain an index or table of contents of information that can be found across a large distributed network. Distributed networks may include computers, users, files shared on file servers, and web apps. Examples of catalog servers are directory servers and name servers.&lt;br&gt;
Their clients are any computer program that needs to find something on the network. An example can be a domain member attempting to log in, an email client looking for an email address, or a user looking for a file &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Communication Server&lt;/strong&gt;&lt;br&gt;
These servers maintain an environment needed for one communication endpoint to find other endpoints and then communicate with them.&lt;br&gt;
These servers may or may not include a directory of communication endpoints and a presence detection service, depending on the openness and security parameters of the network. Their clients are communication endpoints. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Computing Server&lt;/strong&gt;&lt;br&gt;
These servers share vast amounts of computing resources which include CPU and random-access memory over a network. Any computer program that needs more CPU power and RAM than a personal computer can probably afford can use these types of servers.&lt;br&gt;
The client must be a networked computer to implement the client–server model which is a necessity. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Database Server&lt;/strong&gt;&lt;br&gt;
These servers maintain and share any form of database over a network. A database is an organized collection of data with predefined properties that may be displayed in a table.&lt;br&gt;
Clients of these servers are spreadsheets, accounting software, asset management software, or virtually any computer program that consumes well-organized data, especially in large volumes. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fax Server&lt;/strong&gt;&lt;br&gt;
These servers share one or more fax machines over a network which eliminates the hassle of physical access. Any fax sender or recipient is the client of these servers.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File Server&lt;/strong&gt;&lt;br&gt;
Shares files and folders, storage space to hold files and folders, or both, over a network. Networked computers are the intended clients, even though local programs can be clients.&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%2F2ntytmcbkzvr6kdlbgvb.jpg" 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%2F2ntytmcbkzvr6kdlbgvb.jpg" alt=" " width="768" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Game Server&lt;/strong&gt;&lt;br&gt;
These servers enable several computers or gaming devices to play multiplayer games. Personal computers or gaming consoles are their clients. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mail Server&lt;/strong&gt;&lt;br&gt;
These servers make email communication possible in the same way as a post office makes snail mail communication possible. Clients of these servers are senders and recipients of email.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Print Server&lt;/strong&gt;&lt;br&gt;
These servers share one or more printers over a network which eliminates the hassle of physical access. Their clients are computers in need of printing something.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Proxy Server&lt;/strong&gt;&lt;br&gt;
This server acts as an intermediary between a client and a server accepting incoming traffic from the client and sending it to the server.&lt;/p&gt;

&lt;p&gt;Reasons to use a proxy server include content control and filtering, improving traffic performance, preventing unauthorized network access, simply routing the traffic over a large and complex network. Their clients are any networked computer. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web Server&lt;/strong&gt;&lt;br&gt;
These servers host web pages. A web server is responsible for making the World Wide Web possible. Each website has one or more web servers. Their clients are computers with a web browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;404 Not Found&lt;/strong&gt;&lt;br&gt;
The HTTP 404 Not Found client error response status code indicates that the server cannot find the requested resource. Links that lead to a 404 page are often called broken or dead links and can be subject to link rot.&lt;/p&gt;

&lt;p&gt;A 404 status code only indicates that the resource is missing without indicating if this is temporary or permanent. If a resource is permanently removed, servers should send the 410 Gone status instead.&lt;/p&gt;

&lt;p&gt;404 errors on a website can lead to a poor user experience for your visitors, so the number of broken links (internal and external) should be minimized to prevent frustration for readers. Common causes of 404 responses are mistyped URLs or pages that are moved or deleted without redirection. For more information, see the Redirections in HTTP guide.&lt;/p&gt;

&lt;p&gt;** Custom error page in Apache**&lt;br&gt;
For the Apache server, you can specify a path to a custom 404 page in a .htaccess file. The example below uses notfound.html as a page to show visitors on 404s, although a common approach is to name the file 404.html or 404.php (depending on the server-side technology) at the top-level of the server&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Apache HTTP Server&lt;/strong&gt;&lt;br&gt;
The Apache HTTP Server is a free, open-source cross-platform web server managed by the Apache Software Foundation. It powers millions of websites globally by processing HTTP requests and delivering content over the internet. It is highly valued for its reliability, flexible configuration, and extensive module support&lt;br&gt;
A fast, reliable, and extensible open-source web server for modern operating systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-&lt;/strong&gt; Flexible configuration — .htaccess per-directory config, virtual hosts, dynamic module loading.&lt;br&gt;
   &lt;strong&gt;-&lt;/strong&gt; Security — TLS/SSL, authentication modules, fine-grained access control.&lt;br&gt;
   &lt;strong&gt;-&lt;/strong&gt; Performance — event MPM, HTTP/2, content caching, reverse proxy.&lt;br&gt;
   &lt;strong&gt;-&lt;/strong&gt; Extensibility — 100+ modules for rewriting, proxying, load balancing, scripting, and more.&lt;br&gt;
   &lt;strong&gt;-&lt;/strong&gt; Portability — runs on Linux, Windows, macOS, and most Unix-like systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Refrence&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/404#custom_error_page_in_apache" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/404#custom_error_page_in_apache&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/computer-networks/what-is-server/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/computer-networks/what-is-server/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://httpd.apache.org/" rel="noopener noreferrer"&gt;https://httpd.apache.org/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>git commands</title>
      <dc:creator>Ezhil Arasan</dc:creator>
      <pubDate>Fri, 22 May 2026 15:43:37 +0000</pubDate>
      <link>https://dev.to/ezhil_arasan_d1230a486501/git-commands-18co</link>
      <guid>https://dev.to/ezhil_arasan_d1230a486501/git-commands-18co</guid>
      <description>&lt;p&gt;&lt;strong&gt;Git status&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;Status&lt;/code&gt; shows, well, the status of your working tree. Specifically, you'll be able to see your current branch, tracked and untracked files, as well as staged and unstaged changes:&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%2F3qntctm13c9dhak6u35q.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%2F3qntctm13c9dhak6u35q.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, in the example above we can see that the current branch is master. The main.rb file is already tracked by Git and it has some changes that are not yet staged for commit (we will see how to achieve that a bit later).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git add&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;add&lt;/code&gt; is probably one of the most common Git commands. So, what operation does it perform? Basically, it updates the index with the content found in your working tree thus making the content staged for the next commit. An index is like a snapshot of your working tree. When you perform a commit, this snapshot is utilized. Therefore, before doing a commit you should perform git add for any files that were modified or created.&lt;/p&gt;

&lt;p&gt;In the simplest case you can say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This dot . means "take all the files in the working tree" and add them to the index. &lt;/p&gt;

&lt;p&gt;However, you can also add individual files and folders as well as use fileglobs&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add single_file.txt
git add my_folder
git add &lt;span class="k"&gt;*&lt;/span&gt;.rb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, to summarize: after you have performed some changes in your project, you will need to run git add before doing a commit. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git commit&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;commit&lt;/code&gt; is one of the most important Git commands as it records the changes to the repository based on the current index (the snapshot that you've created). To perform a new commit and add a small informational message for it, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"My first commit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now all the staged files will be commited and added to the project history. Also, you can use the -a option to automatically stage and then commit all the files that have been modified and deleted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-am&lt;/span&gt; &lt;span class="s2"&gt;"My first commit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Unfortunately, this option will ignore untracked files, therefore you will still have to say git add . for these new files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git push/pull&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;Push&lt;/code&gt; Git command allows you to send local changes to the remote repository which is usually hosted on services like GitHub, Bitbucket, GitLab, or Azure DevOps repos. &lt;/p&gt;

&lt;p&gt;First of all, you will need to actually add information about this remote repository by running something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add origin https://github.com/username/repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Usually this command will be supplied to you by the service you're using. What it does? It creates something like a "pointer" to a remote repository that is stored on &lt;code&gt;github.com.&lt;/code&gt; This remote repository has an alias &lt;code&gt;origin&lt;/code&gt; but you can call it anything you'd like (for example, just &lt;code&gt;github&lt;/code&gt;). &lt;/p&gt;

&lt;p&gt;Now, when the remote repository is provided, you can push your local changes:&lt;br&gt;
git push origin master&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example we're taking the contents of the master branch and push it to the remote repository which has an alias origin. &lt;/p&gt;

&lt;p&gt;You can also set origin as "upstream" by saying:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you don't need to provide origin anymore. Just say&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, please note that it will work only for the master branch which was mentioned when creating an upstream — for all other branches you will still have to say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin another_branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To grab changes from the remote repository and apply them locally, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git pull origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command works in the same way as git push. If you have specified an upstream, you can simply say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git pull
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Please note that merge conflicts might occur and you will need to resolve them manually .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git clean&lt;/strong&gt;&lt;br&gt;
Removes untracked files from the working directory. This is the logical counterpart to git reset, which (typically) only operates on tracked files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git clone&lt;/strong&gt;&lt;br&gt;
Creates a copy of an existing Git repository. Cloning is the most common way for developers to obtain a working copy of a central repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git config&lt;/strong&gt;&lt;br&gt;
A convenient way to set configuration options for your Git installation. You’ll typically only need to use this immediately after installing Git on a new development machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git merge&lt;/strong&gt;&lt;br&gt;
A powerful way to integrate changes from divergent branches. After forking the project history with git branch, git merge lets you put it back together again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git checkout&lt;/strong&gt;&lt;br&gt;
In addition to checking out old commits and old file revisions, git checkout is also the means to navigate existing branches. Combined with the basic Git commands, it’s a way to work on a particular line of development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git reset&lt;/strong&gt;&lt;br&gt;
Undoes changes to files in the working directory. Resetting lets you clean up or completely remove changes that have not been pushed to a public repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Refrence&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://lokalise.com/blog/10-git-commands-for-day-to-day-work/" rel="noopener noreferrer"&gt;https://lokalise.com/blog/10-git-commands-for-day-to-day-work/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.atlassian.com/git/glossary#terminology" rel="noopener noreferrer"&gt;https://www.atlassian.com/git/glossary#terminology&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>git</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>html command</title>
      <dc:creator>Ezhil Arasan</dc:creator>
      <pubDate>Thu, 21 May 2026 16:52:24 +0000</pubDate>
      <link>https://dev.to/ezhil_arasan_d1230a486501/html-command-2jh4</link>
      <guid>https://dev.to/ezhil_arasan_d1230a486501/html-command-2jh4</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is command?&lt;/strong&gt;&lt;br&gt;
A command in computing is a specific instruction given to a computer or software program to perform a particular task. It acts as a direct order, such as telling the system to open a file, delete data, or run a program.&lt;/p&gt;

&lt;p&gt;In HTML, "commands" are technically called tags. They are the building blocks used to structure and format web pages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic steps: using tags&lt;/strong&gt;&lt;br&gt;
HTML uses tags to communicate to the client (browser) how to display text and images. Tags are contained in&lt;code&gt;&amp;lt; &amp;gt;&lt;/code&gt;symbols. In most cases you start with the beginning tag, put in the word or words that will be affected by this tag, and at the end of the string of word(s), you place a closing tag.&lt;/p&gt;

&lt;p&gt;For example, to create a title for a document you would do the following:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;title&amp;gt;My First HTML Document&amp;lt;/title&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The closing tag normally contains a "/" before the directive to indicate the termination of the action.&lt;/p&gt;

&lt;p&gt;HTML tags are not case-sensitive, although URLs generally are. In most cases (with the exception of preformatted text) HTML collapses many spaces to one space and does not read blank lines. However, when you write your text you should leave several blank lines between paragraphs to make editing your HTML source document easier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The HTML tag&lt;/strong&gt;&lt;br&gt;
Although not currently required by all clients, the &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; tag signals the point where text should start being interpreted as HTML code. It's probably a good idea to include it in all your documents now, so you don't have to go back to your files and add it later.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; tag is usually placed on the first line of your document. At the end of your document you should close with the &lt;code&gt;&amp;lt;/html&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The head tag&lt;/strong&gt;&lt;br&gt;
Just like the header of a memo, the head of an HTML document contains special information, like its title. The head of a document is demarcated by &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/head&amp;gt;&lt;/code&gt; respectively.&lt;/p&gt;

&lt;p&gt;For the purposes of this class, only the title tag, below, should be included in the document head. A typical head section might look like&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;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;My First HTML Document&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember, the title usually doesn't appear in the document itself, but in a title box or bar at the top of the window. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The body tag&lt;/strong&gt;&lt;br&gt;
Like you might expect, the body tags &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; define the beginning and end of the bulk of your document. All your text, images, and links will be in the body of the document.&lt;/p&gt;

&lt;p&gt;The body should start after the head. A typical page might begin like&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;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;My First HTML Document&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;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 html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Description List&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Programming Languages&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;dl&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dt&amp;gt;&lt;/span&gt;HTML&lt;span class="nt"&gt;&amp;lt;/dt&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dd&amp;gt;&lt;/span&gt;Used to create web pages&lt;span class="nt"&gt;&amp;lt;/dd&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;dt&amp;gt;&lt;/span&gt;CSS&lt;span class="nt"&gt;&amp;lt;/dt&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dd&amp;gt;&lt;/span&gt;Used for styling web pages&lt;span class="nt"&gt;&amp;lt;/dd&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dl&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Headers&lt;/strong&gt;&lt;br&gt;
There are up to six levels of headers that can be used in your document, h1 through h6. Header 1 is the largest header and they get progressively smaller through header 6. Below are each of the six headers and how they usually appear in relation to one another.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;h1&amp;gt;This is a header 1 tag&amp;lt;/h1&amp;gt;&lt;/code&gt;&lt;br&gt;
Headers, as you notice, not only vary in size(h1,h2,h3,h4,h5), they are also bold and have a blank line inserted before and after them. It's important to use headers only for headings, not just to make text bold (we cover the bold tag later). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paragraphs&lt;/strong&gt;&lt;br&gt;
In HTML, a paragraph tag &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; should be put at the end of every paragraph of "normal" text (normal being defined as not already having a tag associated with it).&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`&amp;lt;p&amp;gt;` causes a line break and adds a trailing blank line 
`&amp;lt;br&amp;gt;` causes a line break with no trailing blank line 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;As a convenience to yourself and others who might have to edit your HTML documents, it's a very good idea to put two or three blank lines between paragraphs to facilitate editing. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blockquote&lt;/strong&gt;&lt;br&gt;
The blockquote tag indents the text (both on the left and right) inside the tags. The blockquote tag looks like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;blockquote&amp;gt;...&amp;lt;/blockquote&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Blockquoted text is often used for indenting big blocks of text such as quotations. The text will be indented until the ending tag is encountered. Again, note that the text here is indented on both the left and the right margins.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;list&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%2F0b976twwna3agg3cs5bw.webp" 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%2F0b976twwna3agg3cs5bw.webp" alt=" "&gt;&lt;/a&gt;&lt;br&gt;
 there are three types of lists:&lt;br&gt;
1) ordered lists:   &lt;code&gt;&amp;lt;ol&amp;gt;&lt;/code&gt;,&lt;code&gt;&amp;lt;/ol&amp;gt;&lt;/code&gt;&lt;br&gt;
    the elements of the list are introduced by  &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; (list item)&lt;br&gt;
    the end tag   &lt;code&gt;&amp;lt;/li&amp;gt;&lt;/code&gt;is not optional&lt;br&gt;
    to change the current label to 30, use &lt;code&gt;&amp;lt;li value="30"&amp;gt;&lt;/code&gt;&lt;br&gt;
2) unordered lists:   &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;,&lt;code&gt;&amp;lt;/ul&amp;gt;&lt;/code&gt;&lt;br&gt;
    the elements of the list are introduced by &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; (list item)&lt;br&gt;
    the end tag  &lt;code&gt;&amp;lt;/li&amp;gt;&lt;/code&gt; is not optional&lt;br&gt;
3) definition lists:   &lt;code&gt;&amp;lt;dl&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;/dl&amp;gt;&lt;/code&gt;&lt;br&gt;
    the elements of the list are pairs term-definition introduced by&lt;br&gt;
       &lt;code&gt;&amp;lt;dt&amp;gt;&lt;/code&gt;(definition term)&lt;br&gt;
        &lt;code&gt;&amp;lt;dd&amp;gt;&lt;/code&gt;(definition definition) &lt;br&gt;
    the end tags  &lt;code&gt;&amp;lt;/dt&amp;gt;&lt;/code&gt; and   &lt;code&gt;&amp;lt;/dd&amp;gt;&lt;/code&gt; are not optional&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="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Ordered List&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Subjects&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;ol&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Maths&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Science&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;English&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Computer&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/ol&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Tables&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;/table&amp;gt;&lt;/code&gt;: encloses the table&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;thead&amp;gt;,&lt;/code&gt; &lt;code&gt;&amp;lt;/thead&amp;gt;&lt;/code&gt;: encloses the table head; this helps the browser display the head on each page, if the table is longer.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;tfoot&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;/tfoot&amp;gt;&lt;/code&gt;: encloses the footer of the table; it must precede the&lt;code&gt;&amp;lt;tbody&amp;gt;&lt;/code&gt;
-&lt;code&gt;&amp;lt;tbody&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;/tbody&amp;gt;&lt;/code&gt;: encloses the body of the table&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;tr&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;/tr&amp;gt;&lt;/code&gt;: table row&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;th&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;/th&amp;gt;&lt;/code&gt;: table header cell; used within &lt;code&gt;&amp;lt;tr&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;td&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;/td&amp;gt;&lt;/code&gt;: table data cell; used within `


&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%2F42pvcvxuhnq7gt3ieu4c.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%2F42pvcvxuhnq7gt3ieu4c.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strike-through&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Should you want it, there is a strike-through tag which displays text with a strike.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;strike&amp;gt;This is struck through text&amp;lt;/strike&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;displays as:&lt;/p&gt;

&lt;p&gt;This is struck through text &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Addresses&lt;/strong&gt;&lt;br&gt;
The &lt;code&gt;&amp;lt;address&amp;gt;&lt;/code&gt; tag normally appears at the end of a document and is used most frequently to mark information on contacting the author or institution that has supplied this information. Anything contained within the address tag appears in italics. The address tag is another example of a logical tag, and although it currently does nothing but make text appear in italics, this could change as HTML code advances.&lt;/p&gt;

&lt;p&gt;Here is an example of how an address might appear:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`html&lt;/p&gt;


Introduction to HTML / Pat Androget / Pat_Androget@ncsu.edu


&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And it would appear as:&lt;br&gt;
Introduction to HTML / Pat Androget / &lt;a href="mailto:Pat_Androget@ncsu.edu"&gt;Pat_Androget@ncsu.edu&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Horizontal Rule&lt;/strong&gt;&lt;br&gt;
To separate sections in a document, you can insert a horizontal rule tag &lt;/p&gt;
. A horizontal rule is displayed as follows: 

&lt;p&gt;&lt;strong&gt;Center&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can center text, images, and headings with the center tag:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;center&amp;gt;This is a centered sentence&amp;lt;/center&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The center tag automatically inserts a line break after the closing center tag. &lt;/p&gt;

&lt;p&gt;** Image**&lt;br&gt;
&lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;&lt;br&gt;
        purpose: inline image&lt;br&gt;
        example: &lt;code&gt;&amp;lt;img src="../picture.jpg" height="20%" alt="campus map"&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Refrence&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.apu.ac.jp/%7Egunarto/html.html" rel="noopener noreferrer"&gt;https://www.apu.ac.jp/~gunarto/html.html&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.math.uh.edu/%7Etorok/math_6298/html/commands.html" rel="noopener noreferrer"&gt;https://www.math.uh.edu/~torok/math_6298/html/commands.html&lt;/a&gt;&lt;/p&gt;

&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>html</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
