<?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: Sevaki Rajasekar</title>
    <description>The latest articles on DEV Community by Sevaki Rajasekar (@sevaki_rajasekar_700822f9).</description>
    <link>https://dev.to/sevaki_rajasekar_700822f9</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3250714%2Fd1a24b64-5d53-4cdc-abec-744644a2f405.jpg</url>
      <title>DEV Community: Sevaki Rajasekar</title>
      <link>https://dev.to/sevaki_rajasekar_700822f9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sevaki_rajasekar_700822f9"/>
    <language>en</language>
    <item>
      <title>From Mistakes to Success: My First JavaScript Login Page Validation!</title>
      <dc:creator>Sevaki Rajasekar</dc:creator>
      <pubDate>Wed, 27 Aug 2025 12:30:12 +0000</pubDate>
      <link>https://dev.to/sevaki_rajasekar_700822f9/from-mistakes-to-success-my-first-javascript-login-page-validation-26fj</link>
      <guid>https://dev.to/sevaki_rajasekar_700822f9/from-mistakes-to-success-my-first-javascript-login-page-validation-26fj</guid>
      <description>&lt;p&gt;Hi everyone! Welcome to my another JavaScript series. Today I am going to write about how I create a login page validation using HTML, CSS, JavaScript. Let's see my step by step process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create the inputs (HTML)&lt;/strong&gt; — add &lt;code&gt;id&lt;/code&gt;s so JS can find them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;input id="userName" placeholder="Enter your Username"&amp;gt;
&amp;lt;input id="passWord" type="password" placeholder="Enter your password"&amp;gt;
&amp;lt;button id="loginBtn"&amp;gt;Log In&amp;lt;/button&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;Why: id lets JavaScript get the element. type="password" hides the characters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add demo credentials (JS)&lt;/strong&gt; — only for learning/demo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let defaultUser = "sevaki";
let defaultPass = "1234";

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

&lt;/div&gt;



&lt;p&gt;Why: these are the values you compare against while practicing (not secure in real apps).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write a login function&lt;/strong&gt; — this runs when the user clicks Log In.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function login() {
  // code goes here
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why: enclosing logic in a function means it runs only on demand (not at page load).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read the current input values inside the function&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let user = document.getElementById("userName").value;
let pass = document.getElementById("passWord").value;

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

&lt;/div&gt;



&lt;p&gt;Why: reading &lt;code&gt;.value&lt;/code&gt; inside the function gets what the user typed right now.&lt;br&gt;
**&lt;br&gt;
Compare the values** — check both username and password.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (user === defaultUser &amp;amp;&amp;amp; pass === defaultPass) { /* success */ }
else { /* failure */ }

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

&lt;/div&gt;



&lt;p&gt;Why: &lt;code&gt;===&lt;/code&gt; checks exact match; use &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; to require both fields to match.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Show feedback&lt;/strong&gt; — quick demo uses alert(), but inline messages are better UX.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alert("Login successfully"); // or alert("Login failed! Try again.")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tip: later replace &lt;code&gt;alert()&lt;/code&gt; with updating a &lt;code&gt;&amp;lt;p id="msg"&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt; for nicer UI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hook the function to the button&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple (beginner): add onclick="login()" to the button.&lt;/li&gt;
&lt;li&gt;Cleaner: attach in JS:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;document.getElementById("loginBtn").addEventListener("click", login);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why: this makes the button run the login code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test common cases&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Correct username/password → success.&lt;/li&gt;
&lt;li&gt;Wrong username or wrong password → failure.&lt;/li&gt;
&lt;li&gt;Empty fields → decide to show a “Please fill in” message.
Tip: use user = user.trim() to ignore accidental spaces.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SO that's guys. Here I gave a brief explanation for step by step process. I hope I gave a clear and understandable steps. See you in my next blog.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt; &lt;a href="https://front-end-04f891.gitlab.io/loginpageValidation.html" rel="noopener noreferrer"&gt;https://front-end-04f891.gitlab.io/loginpageValidation.html&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;source code:&lt;/strong&gt; &lt;a href="https://gitlab.com/cloning-projects/front-end/-/blob/main/loginpageValidation.html?ref_type=heads" rel="noopener noreferrer"&gt;https://gitlab.com/cloning-projects/front-end/-/blob/main/loginpageValidation.html?ref_type=heads&lt;/a&gt; &lt;br&gt;
&lt;strong&gt;Reference:&lt;/strong&gt; &lt;a href="https://www.geeksforgeeks.org/javascript/form-validation-using-javascript/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/javascript/form-validation-using-javascript/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to Create a Random Color Generator in JavaScript</title>
      <dc:creator>Sevaki Rajasekar</dc:creator>
      <pubDate>Tue, 26 Aug 2025 11:12:04 +0000</pubDate>
      <link>https://dev.to/sevaki_rajasekar_700822f9/how-to-create-a-random-color-generator-in-javascript-1k5f</link>
      <guid>https://dev.to/sevaki_rajasekar_700822f9/how-to-create-a-random-color-generator-in-javascript-1k5f</guid>
      <description>&lt;p&gt;Hi everyone! After a long break, I here with a awesome method from JavaScript. When you visit websites, you often see different colors that make them look attractive. Did you know you can make your webpage change colors randomly with just a few lines of JavaScript?&lt;/p&gt;

&lt;p&gt;Today, I learned how to generate random colors using hex codes in JavaScript. Let me explain step by step.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Hex Color?
&lt;/h2&gt;

&lt;p&gt;Colors on the web can be written in different ways, and one of the most popular &lt;strong&gt;formats is hexadecimal (hex) colors.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A hex color starts with #.&lt;/li&gt;
&lt;li&gt;It is followed by 6 characters.&lt;/li&gt;
&lt;li&gt;These characters can be numbers (0–9) or letters (A–F).&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;#FF0000 = Red&lt;/li&gt;
&lt;li&gt;#00FF00 = Green&lt;/li&gt;
&lt;li&gt;#0000FF = Blue&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since each position has 16 possibilities (0–9 and A–F), there are more than 16 million possible colors!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Logic Behind Random Colors:
&lt;/h2&gt;

&lt;p&gt;To generate a random hex color, we need to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an array with all possible hex characters (0–9 and A–F).&lt;/li&gt;
&lt;li&gt;Pick random characters from that array.&lt;/li&gt;
&lt;li&gt;Repeat the process 6 times (because hex codes have 6 digits).&lt;/li&gt;
&lt;li&gt;Add # at the beginning.&lt;/li&gt;
&lt;li&gt;Apply it to the background of our webpage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The JavaScript Code:
&lt;/h2&gt;

&lt;p&gt;Here’s the complete code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;title&amp;gt;Random Color Generator&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body class="body"&amp;gt;
  &amp;lt;button onclick="randomValue()"&amp;gt;Click me&amp;lt;/button&amp;gt;

  &amp;lt;script&amp;gt;
    // Step 1: Hex characters array
    let color = [0,1,2,3,4,5,6,7,8,9,"A","B","C","D","E","F"];

    // Step 2: Function to get one random character
    function getRandomDigit() {
      let index = Math.floor(Math.random() * color.length);
      return color[index];
    }

    // Step 3: Function to generate full hex code
    function randomValue() {
      let hexa = "#"; // start with #
      for (let i = 0; i &amp;lt; 6; i++) {
        hexa += getRandomDigit(); // add 6 random characters
      }
      document.querySelector(".body").style.backgroundColor = hexa;
    }
  &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How It Works:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Click the button.&lt;/li&gt;
&lt;li&gt;JavaScript generates a random 6-character hex code.&lt;/li&gt;
&lt;li&gt;That color is applied to the background of the webpage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Example: If the generated code is #3FA2C1, your page will turn into that color!&lt;/p&gt;

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

&lt;p&gt;This small project is a fun way to practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Arrays (storing characters),&lt;/li&gt;
&lt;li&gt;Loops (repeating steps),&lt;/li&gt;
&lt;li&gt;DOM Manipulation (changing webpage background).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now you can impress your friends by showing them a website that changes colors every time you click a button! &lt;/p&gt;

&lt;p&gt;That's it guys. I hope it will be helpful for someone who wants to make them website more style and vibrant.Thank you for reading my blog. Will see you in my next blog.&lt;/p&gt;

&lt;p&gt;Reference:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/5092808/how-do-i-randomly-generate-html-hex-color-codes-using-javascript" rel="noopener noreferrer"&gt;https://stackoverflow.com/questions/5092808/how-do-i-randomly-generate-html-hex-color-codes-using-javascript&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.geeksforgeeks.org/javascript/javascript-generate-random-hex-codes-color/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/javascript/javascript-generate-random-hex-codes-color/&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Create React App vs Vite: Setting Up React on Linux Made Easy</title>
      <dc:creator>Sevaki Rajasekar</dc:creator>
      <pubDate>Thu, 07 Aug 2025 17:12:26 +0000</pubDate>
      <link>https://dev.to/sevaki_rajasekar_700822f9/create-react-app-vs-vite-setting-up-react-on-linux-made-easy-5bao</link>
      <guid>https://dev.to/sevaki_rajasekar_700822f9/create-react-app-vs-vite-setting-up-react-on-linux-made-easy-5bao</guid>
      <description>&lt;p&gt;Hi everyone! Today we are going to see about two types &lt;strong&gt;React installation&lt;/strong&gt; method in &lt;strong&gt;Linux&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Are you starting your React journey on a Linux system and confused between using Create React App (CRA) and Vite? In this blog, I’ll walk you through what they are, how to install them, and which one might be better for your next project.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Create React App (CRA)?
&lt;/h2&gt;

&lt;p&gt;CRA is the &lt;strong&gt;official React setup tool&lt;/strong&gt; that creates everything you need to start a React project without configuring &lt;strong&gt;Webpack&lt;/strong&gt; or &lt;strong&gt;Babel manually.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;br&gt;
    - Beginner-friendly&lt;br&gt;
    - Comes with sensible defaults&lt;br&gt;
    - Supports JSX, ES6+, and more out of the box&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing CRA on Linux
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;# Step 1: Install Node.js and npm (if not already)&lt;/em&gt;&lt;br&gt;
&lt;code&gt;sudo apt update&lt;/code&gt;&lt;br&gt;
&lt;code&gt;sudo apt install nodejs npm&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;# Step 2: Create a new React app&lt;/em&gt;&lt;br&gt;
&lt;code&gt;npx create-react-app my-app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;# Step 3: Navigate to your project&lt;/em&gt;&lt;br&gt;
&lt;code&gt;cd my-app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;# Step 4: Start the development server&lt;/em&gt;&lt;br&gt;
&lt;code&gt;npm start&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%2Frtrjcleik3kobzoxxhm4.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%2Frtrjcleik3kobzoxxhm4.png" alt=" " width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxf323uk5d29rcm4tsbhd.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%2Fxf323uk5d29rcm4tsbhd.png" alt=" " width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhc8jgjr2dawxtawpnivs.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%2Fhc8jgjr2dawxtawpnivs.png" alt=" " width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So,let's see about vite tool,&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Vite?
&lt;/h2&gt;

&lt;p&gt;Vite (pronounced “vite” like “light”) is a &lt;strong&gt;modern build tool&lt;/strong&gt; that’s faster and more efficient than CRA. It uses &lt;strong&gt;ESBuild&lt;/strong&gt; under the hood, offering super fast startup and hot reload.&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%2F7kjvbib95qzi76ymqs07.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%2F7kjvbib95qzi76ymqs07.webp" alt=" " width="800" height="688"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;br&gt;
    - Super fast dev server&lt;br&gt;
    - Supports JSX, TypeScript, Vue, etc.&lt;br&gt;
    - Lightweight and minimal&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing Vite on Linux
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;# Step 1: Install Node.js and npm (if not already)&lt;/em&gt;&lt;br&gt;
&lt;code&gt;sudo apt update&lt;/code&gt;&lt;br&gt;
&lt;code&gt;sudo apt install nodejs npm&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;# Step 2: Create a new Vite React app&lt;/em&gt;&lt;br&gt;
&lt;code&gt;npm create vite@latest my-vite-app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;# Step 3: Choose 'React' and a variant (JavaScript or TypeScript)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;# Step 4: Navigate to the project&lt;/em&gt;&lt;br&gt;
&lt;code&gt;cd my-vite-app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;# Step 5: Install dependencies&lt;/em&gt;&lt;br&gt;
&lt;code&gt;npm install&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;# Step 6: Start the development server&lt;/em&gt;&lt;br&gt;
&lt;code&gt;npm run dev&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Which One Should You Use?
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- **If you're just starting React and want official tools:** Go with CRA.
- **If you want speed and modern dev experience:** Try Vite.
- Both are great, try both once and choose based on your style.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;That's it guys. I hope I gave a clear explanation. Whether you choose CRA or Vite, you're building awesome things with React! I hope this guide helped you understand the differences and how to install them on Linux. Feel free to share your thoughts or questions in the comments.&lt;/p&gt;

&lt;p&gt;Reference: &lt;a href="https://www.geeksforgeeks.org/techtips/how-to-install-reactjs-on-linux/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/techtips/how-to-install-reactjs-on-linux/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>beginners</category>
      <category>programming</category>
      <category>frontend</category>
    </item>
    <item>
      <title>One Method to Rule Them All: Why I Love "addEventListener()"</title>
      <dc:creator>Sevaki Rajasekar</dc:creator>
      <pubDate>Wed, 06 Aug 2025 16:40:49 +0000</pubDate>
      <link>https://dev.to/sevaki_rajasekar_700822f9/one-method-to-rule-them-all-why-i-love-addeventlistener-2218</link>
      <guid>https://dev.to/sevaki_rajasekar_700822f9/one-method-to-rule-them-all-why-i-love-addeventlistener-2218</guid>
      <description>&lt;p&gt;HI everyone! I am back with another blog in my Javascript scries. Today we are going to see about a wonderful Javascript method which is very comfortable to use. If you know this already, well good to go! Otherwise it will help you so much, particularly if you going to study &lt;strong&gt;DOM(Document Object Model)&lt;/strong&gt;. Let's see,&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When I first started learning JavaScript, getting element and making them interactive or dynamic using DOM is a very big task for me. That time I found a method &lt;code&gt;addEventListener()&lt;/code&gt;. It's like giving life to your HTML elements — making them respond when the user interacts with them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an Event?
&lt;/h2&gt;

&lt;p&gt;In JavaScript, an event is an action that occurs in the browser, like:&lt;br&gt;
    - Clicking a button&lt;br&gt;
    - Typing in a textbox&lt;br&gt;
    - Moving the mouse&lt;br&gt;
    - Submitting a form&lt;br&gt;
JavaScript can listen for these events and react when they happen.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is &lt;code&gt;addEventListener()&lt;/code&gt;?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;addEventListener()&lt;/code&gt; is a built-in method that lets you attach a function to run when an event occurs on a specific HTML element.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Syntax:&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Javascript&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;element.addEventListener("eventType", functionToRun);

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;element&lt;/code&gt;: The HTML element you want to interact with&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;"eventType"&lt;/code&gt;: The event name as a string (like &lt;code&gt;"click"&lt;/code&gt;,        &lt;code&gt;"mouseover"&lt;/code&gt;, &lt;code&gt;"input"&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;functionToRun&lt;/code&gt;: The code that should run when the event happens&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example 1&lt;/strong&gt;&lt;br&gt;
Here is my code, by this you will get better knowledge,&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%2Fb80iqzjbmysjagl7w8y0.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%2Fb80iqzjbmysjagl7w8y0.png" alt=" " width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens here:&lt;/strong&gt;&lt;br&gt;
    - When you click the button, the browser shows an alert.&lt;br&gt;
    - The function inside addEventListener() runs only when the click event happens.&lt;br&gt;
Here, I use &lt;code&gt;addEventListener()&lt;/code&gt;, instead of using &lt;code&gt;onclick = "Text change"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 2:&lt;/strong&gt;&lt;br&gt;
In this programming I used &lt;code&gt;onclick = "Text change"&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%2Fljy3a6bp7a931bcvplan.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%2Fljy3a6bp7a931bcvplan.png" alt=" " width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this you may got What I am trying to said.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-Life Use Cases&lt;/strong&gt;&lt;br&gt;
    - Show a success message when a form is submitted&lt;br&gt;
    - Change image when a button is clicked&lt;br&gt;
    - Toggle dark/light mode&lt;br&gt;
    - Validate input when typing&lt;/p&gt;

&lt;p&gt;So that's it guys. When I understood &lt;code&gt;addEventListener()&lt;/code&gt;, JavaScript felt less scary. I hope this post helps you feel the same. Try using it in your own projects, buttons, forms, sliders — and you’ll see how useful it is.&lt;br&gt;
If you liked this post or have questions, feel free to drop a comment! Will see in my next blog.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>What Happens When You Click? JavaScript Events Explained</title>
      <dc:creator>Sevaki Rajasekar</dc:creator>
      <pubDate>Thu, 31 Jul 2025 18:00:52 +0000</pubDate>
      <link>https://dev.to/sevaki_rajasekar_700822f9/what-happens-when-you-click-javascript-events-explained-hk5</link>
      <guid>https://dev.to/sevaki_rajasekar_700822f9/what-happens-when-you-click-javascript-events-explained-hk5</guid>
      <description>&lt;p&gt;Hi everyone! Welcome to my blog. Today we are going to see another blog from my JavaScript series. Let's see the about &lt;strong&gt;Events&lt;/strong&gt; with simple examples.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is JavaScript Events?
&lt;/h2&gt;

&lt;p&gt;An event is something that &lt;strong&gt;happens on a webpage&lt;/strong&gt; — like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A button is clicked &lt;/li&gt;
&lt;li&gt;A key is pressed on the keyboard &lt;/li&gt;
&lt;li&gt;A form is submitted &lt;/li&gt;
&lt;li&gt;The mouse moves over something&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why do we use it?
&lt;/h2&gt;

&lt;p&gt;We use events when we want the webpage to react when a user does something.&lt;br&gt;
&lt;strong&gt;For example:&lt;/strong&gt;&lt;br&gt;
If someone clicks a button, we want to show a message or change the color.&lt;br&gt;
&lt;em&gt;(I hope this example will help to gain more understanding.)&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Let's dive into the technical terms and real-time examples with coding:&lt;/p&gt;
&lt;h2&gt;
  
  
  How does it work?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;First, we choose an element (like a button).&lt;/li&gt;
&lt;li&gt;Then, we tell JavaScript to watch that element for something (like a click).&lt;/li&gt;
&lt;li&gt;When that happens, we tell it to do something (like run a function).
This may confuse you, let me clear with code,&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl6a0519y3cfb0cyo2cue.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%2Fl6a0519y3cfb0cyo2cue.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
Let’s say you have a button:&lt;br&gt;
&lt;em&gt;html&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button&amp;gt;Click me!&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You want to show a message when someone clicks it.&lt;/p&gt;

&lt;p&gt;Here’s the JavaScript:&lt;br&gt;
&lt;em&gt;Javascript&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;document.querySelector("button").addEventListener("click", function() {
  alert("You clicked the button!");
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What this does:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;document.querySelector("button")&lt;/code&gt; — finds the button&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.addEventListener("click", ...)&lt;/code&gt; — watches for a click&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;function() { alert(...) }&lt;/code&gt; — shows a message when clicked&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common HTML Events
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;onchange - An HTML element has been changed&lt;/li&gt;
&lt;li&gt;onclick - The user clicks an HTML element&lt;/li&gt;
&lt;li&gt;onmouseover - The user moves the mouse over an HTML element&lt;/li&gt;
&lt;li&gt;onmouseout - The user moves the mouse away from an HTML element&lt;/li&gt;
&lt;li&gt;onkeydown - The user pushes a keyboard key&lt;/li&gt;
&lt;li&gt;onload - The browser has finished loading the page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So that's it, guys. I hope from this blog you got an idea of what is events and what it can do. So as a JavaScript learner, the introduction of "Events" gave me more ideas and understanding about a web page. So thank you for reading my blog. For more content like this, keep in touch with my blog page. Will see you in my next blog.&lt;/p&gt;

&lt;p&gt;Reference: &lt;a href="https://www.w3schools.com/js/js_events.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/js/js_events.asp&lt;/a&gt;&lt;br&gt;
Credits: &lt;br&gt;
Diagram: &lt;a href="https://www.vrogue.co/post/what-is-event-loop-in-node-js-with-example-printable-templates" rel="noopener noreferrer"&gt;https://www.vrogue.co/post/what-is-event-loop-in-node-js-with-example-printable-templates&lt;/a&gt;&lt;br&gt;
Cover image: &lt;a href="https://www.guvi.in/blog/guide-for-events-in-javascript/" rel="noopener noreferrer"&gt;https://www.guvi.in/blog/guide-for-events-in-javascript/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Turn Your Objects into Strings: Meet JSON.stringify()</title>
      <dc:creator>Sevaki Rajasekar</dc:creator>
      <pubDate>Tue, 29 Jul 2025 12:45:18 +0000</pubDate>
      <link>https://dev.to/sevaki_rajasekar_700822f9/turn-your-objects-into-strings-meet-jsonstringify-45g</link>
      <guid>https://dev.to/sevaki_rajasekar_700822f9/turn-your-objects-into-strings-meet-jsonstringify-45g</guid>
      <description>&lt;p&gt;Hi everyone! Here is my another blog from Javascript series. Today we are going to see about JSON.stringify(). Let's dive into it,&lt;/p&gt;

&lt;p&gt;First we have to know what is &lt;strong&gt;JSON&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is JSON?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;JSON stands for:&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;J&lt;/strong&gt;avaScript &lt;strong&gt;O&lt;/strong&gt;bject &lt;strong&gt;N&lt;/strong&gt;otation&lt;br&gt;
It’s a simple way to &lt;strong&gt;store and share data&lt;/strong&gt;, like a universal language that different apps and websites understand. &lt;/p&gt;
&lt;h2&gt;
  
  
  Why is JSON important?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Because when computers, websites, or apps talk to each other, they exchange data, and JSON is the most common format they use to do it.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;It works everywhere&lt;/em&gt; ,in websites, mobile apps, APIs, and databases. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope you got better idea about &lt;strong&gt;JSON&lt;/strong&gt;. Now let's see about &lt;strong&gt;.stringify()&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  JSON.stringify()
&lt;/h2&gt;

&lt;p&gt;I will give you a example for better understanding about this, &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Imagine this:&lt;/strong&gt;&lt;br&gt;
You have a box 📦 (object) with information:&lt;br&gt;
&lt;code&gt;let student = {&lt;br&gt;
  name: "Sevaki",&lt;br&gt;
  age: 22&lt;br&gt;
};&lt;/code&gt;&lt;br&gt;
This is a JavaScript object. It’s great inside your code, but you can’t send it directly to a server, or save it in localStorage, because it's not a simple string.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So what do we do?&lt;/strong&gt;&lt;br&gt;
We need to change the object into a string, and that's what JSON.stringify() does!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let student = {
  name: "Sevaki",
  age: 22
};

let stringData = JSON.stringify(student);

console.log(stringData);

&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;{"name":"Sevaki","age":22}&lt;/code&gt;&lt;br&gt;
Now it's a string version of the object!&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;JSON is a text format for data&lt;/li&gt;
&lt;li&gt;Commonly used for data transfer (like in APIs)&lt;/li&gt;
&lt;li&gt;Use JSON.stringify() to convert object to string&lt;/li&gt;
&lt;li&gt;Use JSON.parse() to convert string to object&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So that's guys. I gave a beginner explanation only. In my future blog I will watering to this blog. Thankyou for reading my blog. Will see you in my next blog. If anything wrong in this blog please do comments, it will helpful for me too.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Which Coder Are You? Discover Your Programming Style!</title>
      <dc:creator>Sevaki Rajasekar</dc:creator>
      <pubDate>Mon, 28 Jul 2025 12:20:21 +0000</pubDate>
      <link>https://dev.to/sevaki_rajasekar_700822f9/which-coder-are-you-discover-your-programming-style-4830</link>
      <guid>https://dev.to/sevaki_rajasekar_700822f9/which-coder-are-you-discover-your-programming-style-4830</guid>
      <description>&lt;p&gt;Hi everyone! Today we are going to see about &lt;strong&gt;Programming Paradigm&lt;/strong&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Programming Paradigm?
&lt;/h2&gt;

&lt;p&gt;A programming paradigm is just a style or method of writing code.&lt;br&gt;
It’s like different ways to solve a problem using a programming language.&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%2Fydqwwcrum8unvmc9ffbe.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%2Fydqwwcrum8unvmc9ffbe.png" alt=" " width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Procedural Programming&lt;/strong&gt;&lt;br&gt;
    This paradigm emphasizes on procedure in terms of under lying machine model. There is no difference in between procedural and imperative approach. It has the ability to reuse the code and it was boon at that time when it was in use because of its reusability.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Prompt the user for input
let num = prompt("Enter any Number: ");

// Initialize the factorial value to 1
let fact = 1;

// Calculate the factorial of the number
for (let i = 1; i &amp;lt;= num; i++) {
    fact = fact * i;
}

// Print the factorial of the number
console.log("Factorial of " + num + " is: " + fact);

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Object-Oriented Programming (OOP)&lt;/strong&gt;&lt;br&gt;
        The program is written as a collection of classes and object which are meant for communication. The smallest and basic entity is object and all kind of computation is performed on the objects only. More emphasis is on data rather procedure. It can handle almost all kind of real life problems which are today in scenario.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;br&gt;
    - Data security&lt;br&gt;
    - Inheritance&lt;br&gt;
    - Code reusability&lt;br&gt;
    - Flexible and abstraction is also present&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Signup {
    constructor(userid, name, emailid, sex, mob) {
        this.userid = userid;
        this.name = name;
        this.emailid = emailid;
        this.sex = sex;
        this.mob = mob;
    }

    create(userid, name, emailid, sex, mob) {
        console.log("Welcome to GeeksforGeeks\nLets create your account\n");
        this.userid = 132;
        this.name = "Radha";
        this.emailid = "radha.89@gmail.com";
        this.sex = 'F';
        this.mob = 900558981;
        console.log("your account has been created");
    }
}

console.log("GfG!");
let s1 = new Signup();
s1.create(22, "riya", "riya2@gmail.com", 'F', 89002);
// This code is contributed by akshatve2zi2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Functional Programming&lt;/strong&gt;&lt;br&gt;
    The functional programming paradigms has its roots in mathematics and it is language independent. The key principle of this paradigms is the execution of series of mathematical functions. &lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Functional style
const square = (x) =&amp;gt; x * x;

console.log("Square is:", square(5));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note: In functional programming, we use pure functions and avoid changing variables.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Declarative Programming&lt;/strong&gt;&lt;br&gt;
   It is divided as Logic, Functional, Database. In computer science the declarative programming is a style of building programs that expresses logic of computation without talking about its control flow. It often considers programs as theories of some logic.It may simplify writing parallel programs.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// React (Declarative UI)
function App() {
  const num = 5;
  return &amp;lt;h1&amp;gt;Square is {num * num}&amp;lt;/h1&amp;gt;;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;In declarative programming, we describe what we want, not how to do it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Logic Programming&lt;/strong&gt;&lt;br&gt;
   It can be termed as abstract model of computation. It would solve logical problems like puzzles, series etc. In logic programming we have a knowledge base which we know before and along with the question and knowledge base which is given to machine, it produces result.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Simulated logic style using conditions
function square(x, y) {
  if (y === x * x) {
    return true;
  }
  return false;
}

console.log(square(5, 25)); // true
console.log(square(5, 20)); // false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;True logic programming (like in Prolog) uses rules and lets the system find the answer.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So that's it guys. I hope I gave a clear explanation about these topic. So let me know if anything I gave wrong here. Thank you for reading my blog. Will se in my next Blog.&lt;/p&gt;

&lt;p&gt;Resource:&lt;a href="https://www.geeksforgeeks.org/system-design/introduction-of-programming-paradigms/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/system-design/introduction-of-programming-paradigms/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Can It Change? Understanding Mutable and Immutable in JS</title>
      <dc:creator>Sevaki Rajasekar</dc:creator>
      <pubDate>Fri, 25 Jul 2025 16:16:10 +0000</pubDate>
      <link>https://dev.to/sevaki_rajasekar_700822f9/can-it-change-understanding-mutable-and-immutable-in-js-270o</link>
      <guid>https://dev.to/sevaki_rajasekar_700822f9/can-it-change-understanding-mutable-and-immutable-in-js-270o</guid>
      <description>&lt;p&gt;Hi all! Welcome to my another blog. Here is a another blog from my JavaScript series, about Mutable and Immutable objects in JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Mutable and Immutable?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Imagine this:&lt;/em&gt;&lt;br&gt;
    -&amp;gt; &lt;strong&gt;Mutable&lt;/strong&gt; is like a &lt;strong&gt;whiteboard&lt;/strong&gt; — you can erase and change what you write.&lt;br&gt;
    -&amp;gt; &lt;strong&gt;Immutable&lt;/strong&gt; is like a &lt;strong&gt;permanent marker on paper&lt;/strong&gt; — once you write it, you can’t change it.&lt;/p&gt;

&lt;p&gt;Now we will see one by one with examples;&lt;/p&gt;

&lt;h2&gt;
  
  
  Mutable – Can be Changed
&lt;/h2&gt;

&lt;p&gt;If something is mutable, you can change its content after it’s created.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example with an object:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;let person = { name: "Alice" };&lt;br&gt;
person.name = "Bob";  // We changed the name&lt;br&gt;
console.log(person);  // { name: "Bob" }&lt;/code&gt;&lt;br&gt;
Here, the object person is mutable — we changed its value after creating it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example with an array:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;let numbers = [1, 2, 3];&lt;br&gt;
numbers.push(4);  // Added a new number&lt;br&gt;
console.log(numbers);  // [1, 2, 3, 4]&lt;/code&gt;&lt;br&gt;
The array is mutable — we changed it by adding a number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Mutable Types:&lt;/strong&gt;&lt;br&gt;
    - Objects ({})&lt;br&gt;
    - Arrays ([])&lt;br&gt;
    - Functions&lt;br&gt;
    - Dates&lt;br&gt;
    - Sets and Maps&lt;/p&gt;

&lt;h2&gt;
  
  
  Immutable – Cannot be Changed
&lt;/h2&gt;

&lt;p&gt;If something is immutable, you can’t change its content. If you try, nothing happens or a new value is created instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example with a string:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;let name = "Alice";&lt;br&gt;
name[0] = "B";  // Trying to change the first letter&lt;br&gt;
console.log(name);  // Still "Alice"&lt;/code&gt;&lt;br&gt;
Strings are immutable — you can’t change a part of it. You’d need to make a new string.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example with a number:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;let a = 10;&lt;br&gt;
let b = a;     // b is now 10&lt;br&gt;
b = 20;        // Changed b, but a stays the same&lt;br&gt;
console.log(a);  // Still 10&lt;/code&gt;&lt;br&gt;
Numbers are immutable — you can’t change them directly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Immutable Types (Primitives):&lt;/strong&gt;&lt;br&gt;
    - String&lt;br&gt;
    - Number&lt;br&gt;
    - Boolean&lt;br&gt;
    - null&lt;br&gt;
    - undefined&lt;br&gt;
    - BigInt&lt;br&gt;
    - Symbol&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple Tip to Remember:&lt;/strong&gt;&lt;br&gt;
    &lt;em&gt;- Objects &amp;amp; Arrays = can change = mutable&lt;br&gt;
     - Strings &amp;amp; Numbers = can’t change = immutable&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So that's it guys. I hope I gave a basic and clear explanation which is understandable by beginners also. Thank you for reading my blog. Keep in touch with my page, so you can get more like this content. See in my next blog.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Loops That Think First vs Loops That Just Do It!</title>
      <dc:creator>Sevaki Rajasekar</dc:creator>
      <pubDate>Tue, 15 Jul 2025 12:54:33 +0000</pubDate>
      <link>https://dev.to/sevaki_rajasekar_700822f9/loops-that-think-first-vs-loops-that-just-do-it-3pih</link>
      <guid>https://dev.to/sevaki_rajasekar_700822f9/loops-that-think-first-vs-loops-that-just-do-it-3pih</guid>
      <description>&lt;p&gt;Hi all! Today I am going to write about a part of loops which is very interesting. So today we talk about &lt;strong&gt;Entry check and Exit check&lt;/strong&gt; in Loops.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is a Loop?
&lt;/h2&gt;

&lt;p&gt;A loop is a structure that repeats a block of code as long as a condition is true.&lt;br&gt;
But when the condition is checked, before or after the loop body, makes the difference between entry check and exit check.&lt;/p&gt;

&lt;h2&gt;
  
  
  Entry Check Loop (Condition is checked before the loop runs):
&lt;/h2&gt;

&lt;p&gt;-&amp;gt; The loop only runs if the condition is true.&lt;br&gt;
-&amp;gt; If the condition is false at the beginning, the loop won’t run at all.&lt;br&gt;
-&amp;gt; Also called &lt;strong&gt;pre-test&lt;/strong&gt; loop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;br&gt;
    - for loop&lt;br&gt;
    - while loop&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;a) while loop (entry check)&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;let i = 0;&lt;br&gt;
while (i &amp;lt; 3) {&lt;br&gt;
  console.log(i);&lt;br&gt;
  i++;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
0&lt;br&gt;
1&lt;br&gt;
2&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If the condition is false:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;let i = 5;&lt;br&gt;
while (i &amp;lt; 3) {&lt;br&gt;
  console.log(i); // This will NOT run&lt;br&gt;
  i++;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
(nothing happens, because the condition is false at start)&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-Life Example (Entry Check):
&lt;/h2&gt;

&lt;p&gt;Imagine you’re entering a movie theater. The security guard checks your ticket before you go in.&lt;br&gt;
    ✅ If you have a ticket → you can enter.&lt;br&gt;
    ❌ If you don’t → you can’t enter at all.&lt;br&gt;
Same way, if the condition fails at the beginning, the loop won’t start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Exit Check Loop (Condition is checked after the loop runs):
&lt;/h2&gt;

&lt;p&gt;-&amp;gt; The loop body always runs once, even if the condition is false.&lt;br&gt;
-&amp;gt; Condition is checked after one execution.&lt;br&gt;
-&amp;gt; Also called &lt;strong&gt;post-test&lt;/strong&gt; loop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
    - do...while loop&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;do...while loop&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;let i = 0;&lt;br&gt;
do {&lt;br&gt;
  console.log(i);&lt;br&gt;
  i++;&lt;br&gt;
} while (i &amp;lt; 3);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
0&lt;br&gt;
1&lt;br&gt;
2&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Even if the condition is false at the start, the loop runs once:&lt;/em&gt;&lt;br&gt;
&lt;code&gt;let i = 5;&lt;br&gt;
do {&lt;br&gt;
  console.log(i); // This still runs once&lt;br&gt;
  i++;&lt;br&gt;
} while (i &amp;lt; 3);&lt;/code&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Real-Life Example (Exit Check):
&lt;/h2&gt;

&lt;p&gt;Think of a restaurant where you can eat first and pay after.&lt;br&gt;
    ✅ You eat → then they check if you can pay.&lt;br&gt;
    If you can’t pay, they stop you from eating again.&lt;br&gt;
    But you already ate once!&lt;br&gt;
This is like an exit-check loop: one-time execution guaranteed.&lt;/p&gt;

&lt;p&gt;So that's it for today. I hope I gave a clear explanation. Thank you reading my blog. Will see in my next blog.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>The Loop Trio: Start, Check, Repeat!</title>
      <dc:creator>Sevaki Rajasekar</dc:creator>
      <pubDate>Mon, 14 Jul 2025 12:01:41 +0000</pubDate>
      <link>https://dev.to/sevaki_rajasekar_700822f9/the-loop-trio-start-check-repeat-139g</link>
      <guid>https://dev.to/sevaki_rajasekar_700822f9/the-loop-trio-start-check-repeat-139g</guid>
      <description>&lt;p&gt;Hi everyone! Welcome to my another blog from &lt;strong&gt;JavaScript series&lt;/strong&gt;. Today I am going to write about the important parts of Loops. It's a very interesting topic also. So will se some about that,&lt;/p&gt;

&lt;p&gt;Think of a loop like a cycle or a repeating action. For example, if you want to say “Hello” 5 times, you can use a loop instead of writing it 5 times.&lt;/p&gt;

&lt;h2&gt;
  
  
  Initialization – Start Point:
&lt;/h2&gt;

&lt;p&gt;-&amp;gt; This is where the loop begins.&lt;br&gt;
-&amp;gt; You create a variable (like i) and give it a starting value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think of it like starting a car.&lt;/strong&gt;&lt;br&gt;
You must turn on the key before driving.&lt;br&gt;
&lt;em&gt;Example:&lt;/em&gt;&lt;br&gt;
&lt;code&gt;let i = 0;&lt;/code&gt;&lt;br&gt;
Here, i is starting at 0.&lt;/p&gt;

&lt;h2&gt;
  
  
  Condition – When to Continue:
&lt;/h2&gt;

&lt;p&gt;-&amp;gt; This checks if the loop should keep going.&lt;br&gt;
-&amp;gt; If the condition is true, the loop runs again.&lt;br&gt;
-&amp;gt; If it’s false, the loop stops.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think of it like a traffic signal.&lt;/strong&gt;&lt;br&gt;
If it's green, you keep going. If red, you stop.&lt;br&gt;
&lt;em&gt;Example:&lt;/em&gt;&lt;br&gt;
&lt;code&gt;i &amp;lt; 5;&lt;/code&gt;&lt;br&gt;
&lt;em&gt;This means:&lt;/em&gt; "Keep going as long as i is less than 5."&lt;/p&gt;

&lt;h2&gt;
  
  
  Increment or Decrement – How to Move:
&lt;/h2&gt;

&lt;p&gt;-&amp;gt; After each loop, you change the value of the variable.&lt;br&gt;
-&amp;gt; You either increase or decrease it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think of it like taking steps.&lt;/strong&gt;&lt;br&gt;
You must move forward or backward each time.&lt;br&gt;
&lt;em&gt;Example:&lt;/em&gt;&lt;br&gt;
&lt;code&gt;i++;&lt;/code&gt;&lt;br&gt;
&lt;em&gt;This means:&lt;/em&gt; "Add 1 to i every time."&lt;/p&gt;

&lt;h2&gt;
  
  
  Full Loop Example:
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;for (let i = 0; i &amp;lt; 5; i++) {&lt;br&gt;
  console.log("Hello");&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s Happening?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start with i = 0&lt;/li&gt;
&lt;li&gt;Check i &amp;lt; 5 (is 0 less than 5?) Yes&lt;/li&gt;
&lt;li&gt;Print "Hello"&lt;/li&gt;
&lt;li&gt;Add 1 to i → now i = 1&lt;/li&gt;
&lt;li&gt;Repeat steps 2 to 4&lt;/li&gt;
&lt;li&gt;When i = 5, the condition is false → loop stops&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Real-Life Example:
&lt;/h2&gt;

&lt;p&gt;Imagine you have 5 mangoes and want to count them one by one.&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%2F09pdqz1ypkdbpriiy9f3.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%2F09pdqz1ypkdbpriiy9f3.jpg" alt=" " width="800" height="149"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You will see:&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%2Fbi2v9fapw8ag1s7dw3ed.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%2Fbi2v9fapw8ag1s7dw3ed.jpg" alt=" " width="800" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So these are the basic introduction about Loops. Here I showed the &lt;strong&gt;For Loops&lt;/strong&gt; examples. My upcoming blogs will cover all the loop types. Thank you for reading my blog. See you in my next Blog.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Do You Need Instagram to Stay Connected? Not Really.</title>
      <dc:creator>Sevaki Rajasekar</dc:creator>
      <pubDate>Fri, 11 Jul 2025 12:49:05 +0000</pubDate>
      <link>https://dev.to/sevaki_rajasekar_700822f9/do-you-need-instagram-to-stay-connected-not-really-4kpo</link>
      <guid>https://dev.to/sevaki_rajasekar_700822f9/do-you-need-instagram-to-stay-connected-not-really-4kpo</guid>
      <description>&lt;p&gt;Hi all! Welcome to my another blog. Today, I am going to talk about "life without Instagram" as a person who has not used Instagram for the past 4 years. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The reasons why I am not using Instagram?&lt;/strong&gt; &lt;br&gt;
"I feel very bored with using Instagram and tired of checking notifications. I used to think that while using Instagram, "What I achieved to post about myself on Instagram? Why do I like random people's Highlights, stories, and profiles?" In my opinion, these things are very useless to me in my growing period. So I quit using that". &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I feel while others are using and creating interesting talks about that:&lt;/strong&gt;&lt;br&gt;
In that situation, I really feel like, because of not using Instagram, I am being ignored by them. If we went somewhere with friends, they all have Instagram, so they click pictures and post it on their profiles and tag each others. That situation I will be like "🤦‍♀️😆". Actually, I don't like that stuff.&lt;br&gt;
And also sometimes I get angry at some people, those who prioritize Instagram over their career. After you hear this, now you may think, "I a very productive girl". Nothing like that. let me tell you,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here is the plot twist:&lt;/strong&gt; &lt;br&gt;
After deleting Instagram, I switched to "YouTube Shorts". Now I also know the trending songs, dance steps, etc. But escaped from tagging others, replying to messages, often checking our story viewers(uffff😮‍💨).&lt;br&gt;
Now I can't do anything without using YouTube. If I think about uninstalling, some of my study reasons stops me. So I want the solution for "I want to use YouTube in a productive way". And also If anyone knows how to use YouTube in a productive way, give some tips for that😁.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is Instagram Completely Useless?&lt;/strong&gt;&lt;br&gt;
Well, not really. In my point the only advantage of using Instagram is we can communicate with everyone without their phone number. If a new person asked your number, that time you have to give, then you can give your Instagram ID. But now I knew the solution for this scenario, we can also use &lt;strong&gt;Telegram&lt;/strong&gt;. But I agree If a person wants to improve their business and models who wants to show their talents to the media world, Instagram is perfect for that. But for others like me, it's a waste of time to use that.&lt;/p&gt;

&lt;p&gt;So finally, what I am saying is as I said in my title, &lt;strong&gt;Do You Need Instagram to Stay Connected? Not Really.&lt;/strong&gt; Everyone should understand this. All the above messages are from my point of view only. So, thank you for reading my blog. See you in my next blog. &lt;/p&gt;

</description>
      <category>socialmedia</category>
      <category>productivity</category>
      <category>learning</category>
    </item>
    <item>
      <title>Compiled Vs Interpreted Language</title>
      <dc:creator>Sevaki Rajasekar</dc:creator>
      <pubDate>Wed, 09 Jul 2025 13:41:06 +0000</pubDate>
      <link>https://dev.to/sevaki_rajasekar_700822f9/compiled-vs-interpreted-language-5am3</link>
      <guid>https://dev.to/sevaki_rajasekar_700822f9/compiled-vs-interpreted-language-5am3</guid>
      <description>&lt;p&gt;Hi all! Today we are going to see about Compiled and Interpreted language. As a developers we should know about these. Here I planned to share some most important things about those.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Compiled Language?
&lt;/h2&gt;

&lt;p&gt;A compiled language is a programming language that is generally compiled and not interpreted. It is one where the program, once compiled, is expressed in the instructions of the target machine; this machine code is undecipherable by humans.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple Meaning:&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Checks and converts everything before running-&lt;/em&gt; A compiler checks the whole program at once and translates it into machine language (0s and 1s) before running. So it will allow you to type full program, finally it will show errors if it's exist. In case if your 50 lines code has 1 error in 20th line, compiler don't show the output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think like(More explanation):&lt;/strong&gt;&lt;br&gt;
You write a story in English. A translator translates the full story into Tamil. Then someone reads the whole Tamil version.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;C&lt;/li&gt;
&lt;li&gt;C++&lt;/li&gt;
&lt;li&gt;Java (partly)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fltfkt8vmj2ed2qvzo1bv.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%2Fltfkt8vmj2ed2qvzo1bv.png" alt=" " width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Interpreted Language:
&lt;/h2&gt;

&lt;p&gt;An interpreted language is a programming language that is generally interpreted, without compiling a program into machine instructions. It is one where the instructions are not directly executed by the target machine, but instead, read and executed by some other program. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple Meaning:&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Checks and runs one line at a time-&lt;/em&gt; An interpreter reads and runs your program line by line. This means it checks your code line by line, if in case it occurred any errors in 5th line in your 50 lines code, while you run the code, it shows output for that first 4 line code, and warn the 5th line error.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think like(More explanation):&lt;/strong&gt; &lt;br&gt;
You write a story in English. A translator reads each line and speaks it in Tamil immediately.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;JavaScript&lt;/li&gt;
&lt;li&gt;Ruby&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So that's it. I gave some basic info only here. In the future, I can water the roots of this blog. Will see in my next blog.&lt;/p&gt;

&lt;p&gt;Reference:&lt;a href="https://www.geeksforgeeks.org/compiler-design/difference-between-compiled-and-interpreted-language/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/compiler-design/difference-between-compiled-and-interpreted-language/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
