<?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: Saravanan Cn</title>
    <description>The latest articles on DEV Community by Saravanan Cn (@saravanan_cn_183fcba7cc7a).</description>
    <link>https://dev.to/saravanan_cn_183fcba7cc7a</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%2F4120818%2F54475d09-ae2f-41d6-9b95-a5b0bf9a5e48.png</url>
      <title>DEV Community: Saravanan Cn</title>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saravanan_cn_183fcba7cc7a"/>
    <language>en</language>
    <item>
      <title>Day 2 of Learning Python: Practising Python Fundamentals 🐍</title>
      <dc:creator>Saravanan Cn</dc:creator>
      <pubDate>Tue, 27 Oct 2026 14:31:25 +0000</pubDate>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a/day-2-of-learning-python-practising-python-fundamentals-5ag1</link>
      <guid>https://dev.to/saravanan_cn_183fcba7cc7a/day-2-of-learning-python-practising-python-fundamentals-5ag1</guid>
      <description>&lt;h2&gt;
  
  
  1. Variables in Python
&lt;/h2&gt;

&lt;p&gt;A variable is a name that refers to a value.&lt;/p&gt;

&lt;p&gt;`name = "Python"&lt;br&gt;
age = 25&lt;/p&gt;

&lt;p&gt;print(name)&lt;br&gt;
print(age)&lt;/p&gt;

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

&lt;p&gt;Python&lt;br&gt;
25`&lt;/p&gt;

&lt;p&gt;Python automatically determines the type of a value when it is assigned to a variable.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Operators in Python
&lt;/h2&gt;

&lt;p&gt;Operators are symbols or keywords that perform operations on values.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Arithmetic operators&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
`a = 10&lt;br&gt;
b = 3&lt;/p&gt;

&lt;p&gt;print(a + b)  # Addition&lt;br&gt;
print(a - b)  # Subtraction&lt;br&gt;
print(a * b)  # Multiplication&lt;br&gt;
print(a / b)  # Division&lt;br&gt;
print(a % b)  # Modulus&lt;/p&gt;

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

&lt;p&gt;13&lt;br&gt;
7&lt;br&gt;
30&lt;br&gt;
3.3333333333333335&lt;br&gt;
1`&lt;/p&gt;

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

&lt;p&gt;Comparison operators compare two values and return True or False.&lt;/p&gt;

&lt;p&gt;`print(10 &amp;gt; 5)&lt;br&gt;
print(10 == 5)&lt;br&gt;
print(10 != 5)&lt;/p&gt;

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

&lt;p&gt;True&lt;br&gt;
False&lt;br&gt;
True`&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Type Conversion
&lt;/h2&gt;

&lt;p&gt;Type conversion means converting a value from one data type to another.&lt;/p&gt;

&lt;p&gt;`age = "25"&lt;/p&gt;

&lt;p&gt;age = int(age)&lt;/p&gt;

&lt;p&gt;print(age)&lt;br&gt;
print(type(age))&lt;/p&gt;

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

&lt;p&gt;25&lt;br&gt;
&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Here, int() converts the string "25" into the integer 25.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Taking Input from the User&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Python provides the input() function to accept information from a user.&lt;/p&gt;

&lt;p&gt;name = input("Enter your name: ")&lt;/p&gt;

&lt;p&gt;print("Hello", name)&lt;/p&gt;

&lt;p&gt;The program asks for a name and displays a greeting.&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Python for Beginners: What Is Python? A Complete Introduction 🐍</title>
      <dc:creator>Saravanan Cn</dc:creator>
      <pubDate>Mon, 26 Oct 2026 12:15:14 +0000</pubDate>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a/python-for-beginners-what-is-python-a-complete-introduction-5heb</link>
      <guid>https://dev.to/saravanan_cn_183fcba7cc7a/python-for-beginners-what-is-python-a-complete-introduction-5heb</guid>
      <description>&lt;h2&gt;
  
  
  1. What Is Python?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Python is a high-level, general-purpose programming language known for its simple syntax and readability.&lt;/li&gt;
&lt;li&gt;It was created by Guido van Rossum and first released in 1991.&lt;/li&gt;
&lt;li&gt;Python allows developers to write programs using code that is relatively easy for humans to read and understand.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;`print("Hello, World!")&lt;/p&gt;

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

&lt;p&gt;Hello, World!&lt;/p&gt;

&lt;p&gt;The print() function displays the text on the screen.`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where is Python used?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Python is used in many fields, including:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web development:&lt;/strong&gt; Building websites and web applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Artificial intelligence:&lt;/strong&gt; Developing AI applications and machine learning models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data science:&lt;/strong&gt; Analyzing and visualizing data.&lt;/p&gt;

&lt;p&gt;**Automation: **Automating repetitive tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scientific computing:&lt;/strong&gt; Performing mathematical and scientific calculations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Software development:&lt;/strong&gt; Building different kinds of applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Difference Between Python and Python 3
&lt;/h2&gt;

&lt;p&gt;Python is the name of the programming language. Python 3 is the modern major version of Python.&lt;/p&gt;

&lt;p&gt;Python 2 and Python 3 are different major versions. Python 2 reached the end of its official support on January 1, 2020.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Python 3 is the recommended version for beginners and new projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. High-Level vs. Low-Level Programming Languages
&lt;/h2&gt;

&lt;p&gt;Programming languages can be described by how closely they relate to human-readable concepts or the computer's hardware.&lt;/p&gt;

&lt;h2&gt;
  
  
  High-level programming language
&lt;/h2&gt;

&lt;p&gt;A high-level language uses syntax and concepts that are relatively easy for humans to understand. It hides many hardware details.&lt;/p&gt;

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

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

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

&lt;p&gt;`a = 10&lt;br&gt;
b = 20&lt;/p&gt;

&lt;p&gt;print(a + b)`&lt;/p&gt;

&lt;p&gt;Python lets us add two numbers without manually managing the computer's registers or memory addresses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Low-level programming language&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A low-level language is closer to the computer's hardware and instruction set.&lt;/p&gt;

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

&lt;p&gt;Machine code&lt;/p&gt;

&lt;p&gt;Assembly language&lt;/p&gt;

&lt;p&gt;Low-level programming can offer detailed control over hardware, but it generally requires more knowledge of the underlying computer architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Programming Language vs. Scripting Language
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A scripting language is commonly used to automate tasks, control other programs, or execute sequences of instructions.&lt;/li&gt;
&lt;li&gt;Examples of languages commonly used for scripting include Python, JavaScript, and Bash.&lt;/li&gt;
&lt;li&gt;Programming language&lt;/li&gt;
&lt;li&gt;Programming languages can be used to build software, applications, operating systems, and many other systems.&lt;/li&gt;
&lt;li&gt;Scripting language&lt;/li&gt;
&lt;li&gt;Scripting is often focused on automation and connecting existing tools or components.
&lt;strong&gt;For example, a Python script could automatically rename hundreds of files instead of requiring you to rename each file manually.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;for number in range(1, 6):&lt;br&gt;
    print("Learning Python", number)&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Learning Python 1&lt;br&gt;
Learning Python 2&lt;br&gt;
Learning Python 3&lt;br&gt;
Learning Python 4&lt;br&gt;
Learning Python 5&lt;/p&gt;

&lt;h2&gt;
  
  
  Is Python a programming language or a scripting language?
&lt;/h2&gt;

&lt;p&gt;Python is both.&lt;/p&gt;

&lt;p&gt;It is a general-purpose programming language that is also widely used for scripting and automation. The distinction is mainly about how a language is used, rather than a strict technical division between two types of languages.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Compiled Language vs. Interpreted Language
&lt;/h2&gt;

&lt;p&gt;Programs written in different languages need to be translated or executed in a form the computer can process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compiled languages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A compiler translates source code into another form, often machine code or an intermediate representation, before the program runs.&lt;/li&gt;
&lt;li&gt;Examples include C and C++, which are commonly compiled to native machine code.
**
Interpreted languages
**
An interpreter executes a program by processing its instructions at runtime. Some implementations interpret source code directly, while others use intermediate forms.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Python is commonly described as an interpreted language.&lt;/p&gt;

&lt;p&gt;In the standard Python implementation, CPython, source code is generally compiled into bytecode, which the Python virtual machine executes.&lt;/p&gt;

&lt;p&gt;Main differences&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compiled approach&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Often translates code before execution&lt;/li&gt;
&lt;li&gt;Can produce a standalone native executable&lt;/li&gt;
&lt;li&gt;C and C++ are common examples&lt;/li&gt;
&lt;li&gt;Errors may be detected during compilation or execution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Interpreted approach&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Often processes code during execution&lt;/li&gt;
&lt;li&gt;May require a runtime or interpreter&lt;/li&gt;
&lt;li&gt;Python is a common example&lt;/li&gt;
&lt;li&gt;Errors may be detected during execution&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Disadvantages of Python
&lt;/h2&gt;

&lt;p&gt;Python is useful, but it also has some limitations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Slower execution speed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Python can be slower than compiled languages such as C and C++ for CPU-intensive tasks because of its runtime overhead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Higher memory usage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some Python programs use more memory than comparable programs written in lower-level languages. This can matter for memory-constrained applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Not always ideal for mobile development&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Python is not as commonly used as languages such as Kotlin or Swift for developing native Android and iOS applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Runtime errors&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because Python is dynamically typed, some type-related errors may only become apparent when the relevant code runs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Global Interpreter Lock in CPython&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In standard GIL-enabled CPython builds, the Global Interpreter Lock (GIL) limits how multiple threads execute Python bytecode at the same time. This can affect CPU-bound multithreaded programs, although multiprocessing, native extensions, and free-threaded Python builds provide alternatives.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Not ideal for every application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Python may not be the best choice for every real-time, hardware-constrained, or performance-critical application.&lt;/p&gt;

&lt;p&gt;Despite these limitations, Python remains a popular and powerful languages for beginners and experienced developers alike.&lt;/p&gt;

</description>
      <category>coding</category>
      <category>programming</category>
      <category>python</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 24 of My React Learning Journey 🚀 | useState Hook Practice</title>
      <dc:creator>Saravanan Cn</dc:creator>
      <pubDate>Sun, 25 Oct 2026 16:52:01 +0000</pubDate>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a/day-24-of-my-react-learning-journey-usestate-hook-practice-pco</link>
      <guid>https://dev.to/saravanan_cn_183fcba7cc7a/day-24-of-my-react-learning-journey-usestate-hook-practice-pco</guid>
      <description>&lt;p&gt;Today, I learned more about the useState Hook in React. I practiced increment, decrement, and reset operations. I also worked on two scenarios: a toggle button and an input field.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. useState Hook
&lt;/h2&gt;

&lt;p&gt;The useState Hook allows us to store and update data in a functional component.&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;const [state, setState] = useState(initialValue);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;state stores the current value.&lt;/p&gt;

&lt;p&gt;setState updates the value.&lt;/p&gt;

&lt;p&gt;initialValue is the starting value.&lt;/p&gt;

&lt;p&gt;I also learned that component names should start with a capital letter, such as ToggleButton or NameInput.&lt;/p&gt;

&lt;p&gt;A functional component is a JavaScript function that returns JSX.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Toggle Button: ON and OFF
&lt;/h2&gt;

&lt;p&gt;I created a button that switches between ON and OFF.&lt;/p&gt;

&lt;p&gt;`import { useState } from "react";&lt;/p&gt;

&lt;p&gt;function Toggle() {&lt;br&gt;
    const [ toggle,settoggle] = useState("OFF");&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function togglebtn(){
    if(toggle === "OFF"){
        settoggle("ON");
    }
    else{
        settoggle("OFF");
    }



}
// toggle === "OFF" ? settoggle("ON"): settoggle("OFF");

 return (
    &amp;lt;div&amp;gt;
    &amp;lt;button onClick={togglebtn}&amp;gt; {toggle } &amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;export default Toggle;&lt;br&gt;
`&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I used a Boolean state (true or false).&lt;/li&gt;
&lt;li&gt;The initial value is false, so the button starts at OFF.&lt;/li&gt;
&lt;li&gt;Clicking the button changes the state to its opposite value.&lt;/li&gt;
&lt;li&gt;React updates the UI when the state changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Input Field: Displaying a Name
&lt;/h2&gt;

&lt;p&gt;I also practiced taking a name from an input field and displaying a greeting.&lt;/p&gt;

&lt;p&gt;`import { useState } from 'react';&lt;/p&gt;

&lt;p&gt;function Greeting() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [userinput, setuserInput] = useState("");

 let user_input = "";

 function greet() {
setuserInput("Hello" + user_input);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;function getInput(event) {&lt;br&gt;
   user_input = event.target.value;&lt;br&gt;
   setuserInput(event.target.value);&lt;br&gt;
 }&lt;/p&gt;

&lt;p&gt;return (&lt;br&gt;
     &lt;/p&gt;
&lt;br&gt;
         &lt;br&gt;
         Greet me&lt;br&gt;
         &lt;h1 id="res"&gt;&lt;/h1&gt;
&lt;br&gt;
         &lt;h1&gt;{userinput}&lt;/h1&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;)&lt;br&gt;
 }&lt;/p&gt;

&lt;p&gt;export default Greeting;`&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What I understood:&lt;/li&gt;
&lt;li&gt;useState('') starts with an empty string.&lt;/li&gt;
&lt;li&gt;value={name} connects the input to the state.&lt;/li&gt;
&lt;li&gt;onChange runs when the user types.&lt;/li&gt;
&lt;li&gt;event.target.value gets the text entered by the user.&lt;/li&gt;
&lt;li&gt;setName() updates the state, and React displays the new greeting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why use useState instead of a normal variable?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A normal variable does not automatically tell React to render the component again when its value changes. Using useState lets React keep track of the value and update the UI when the state changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I Learned Today&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The syntax of the useState Hook.&lt;/li&gt;
&lt;li&gt;How to increment, decrement, and reset values.&lt;/li&gt;
&lt;li&gt;How to create a toggle button using Boolean state.&lt;/li&gt;
&lt;li&gt;How to store input values using useState.&lt;/li&gt;
&lt;li&gt;How state updates cause React to update the UI.&lt;/li&gt;
&lt;li&gt;Why functional components and reusable component names are important.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>learning</category>
      <category>react</category>
    </item>
    <item>
      <title>Day 23 of My React.js Learning Journey 🚀 | JSX and Components</title>
      <dc:creator>Saravanan Cn</dc:creator>
      <pubDate>Sat, 24 Oct 2026 01:07:38 +0000</pubDate>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a/day-23-of-my-reactjs-learning-journey-jsx-and-components-p65</link>
      <guid>https://dev.to/saravanan_cn_183fcba7cc7a/day-23-of-my-reactjs-learning-journey-jsx-and-components-p65</guid>
      <description>&lt;p&gt;Today, I learned about JSX in React, component-based architecture, and the two types of React components: class components and functional components. I also got introduced to Hooks and the useState Hook.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. What Is JSX?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Today, I learned about JSX in React, component-based architecture, and the two types of React components: class components and functional components. I also got introduced to Hooks and the useState Hook.&lt;/p&gt;

&lt;p&gt;JSX stands for JavaScript XML. It is a syntax extension for JavaScript that allows us to write HTML-like markup inside JavaScript code.&lt;/p&gt;

&lt;p&gt;Although JSX looks similar to HTML, it follows some different rules.&lt;/p&gt;

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

&lt;p&gt;`&lt;code&gt;function App() {&lt;br&gt;
  return &amp;lt;h1&amp;gt;Hello, React!&amp;lt;/h1&amp;gt;;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;export default App;`&lt;/p&gt;

&lt;p&gt;Here, JSX allows us to write &lt;/p&gt;
&lt;h1&gt; markup directly inside a JavaScript function.&lt;/h1&gt;


&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; JSX lets us create our own React components, such as &lt;em&gt;&lt;/em&gt;. It does not allow us to invent arbitrary HTML tags and automatically make them work.&lt;/p&gt;


&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  

&lt;ol&gt;
&lt;li&gt;React's Component-Based Architecture
&lt;/li&gt;
&lt;/ol&gt;
&lt;/h2&gt;


&lt;p&gt;React uses a component-based architecture. This means we can divide a user interface into small, reusable components.&lt;/p&gt;

&lt;p&gt;For example, an e-commerce website can contain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navbar component&lt;/li&gt;
&lt;li&gt;Product component&lt;/li&gt;
&lt;li&gt;Cart component&lt;/li&gt;
&lt;li&gt;Footer component&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;`function Welcome() {&lt;br&gt;
  return &lt;/p&gt;
&lt;h1&gt;Welcome to React!&lt;/h1&gt;;&lt;br&gt;
}

&lt;p&gt;function App() {&lt;br&gt;
  return (&lt;br&gt;
    &lt;/p&gt;
&lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
    &lt;br&gt;
  );&lt;br&gt;
}

&lt;p&gt;export default App;`&lt;/p&gt;

&lt;p&gt;Here, the Welcome component is reused twice inside the App component.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. What Is the Root in React?
&lt;/h2&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;jsx&lt;br&gt;
`import { createRoot } from 'react-dom/client';&lt;br&gt;
import App from './App.jsx';&lt;/p&gt;

&lt;p&gt;createRoot(document.getElementById('root')).render(&lt;br&gt;
  &lt;br&gt;
);&lt;code&gt;&lt;br&gt;
&lt;/code&gt;``&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;document.getElementById('root') finds the HTML element with the ID root.&lt;/li&gt;
&lt;li&gt;createRoot() creates a React root.&lt;/li&gt;
&lt;li&gt;.render() displays the App component inside that element.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Types of React Components
&lt;/h2&gt;

&lt;p&gt;There are two commonly discussed types of React components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Class Components
&lt;/h2&gt;

&lt;p&gt;`Class components use JavaScript classes and extend React.Component.&lt;br&gt;
import { Component } from 'react';&lt;/p&gt;

&lt;p&gt;class Welcome extends Component {&lt;br&gt;
  render() {&lt;br&gt;
    return &lt;/p&gt;
&lt;h1&gt;Hello, React!&lt;/h1&gt;;&lt;br&gt;
  }&lt;br&gt;
}

&lt;p&gt;export default Welcome;`&lt;/p&gt;

&lt;p&gt;Class components are still supported, but they are less commonly used in new React code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Functional Components
&lt;/h2&gt;

&lt;p&gt;Functional components are JavaScript functions that return React elements.&lt;/p&gt;

&lt;p&gt;`function Welcome() {&lt;br&gt;
  return &lt;/p&gt;
&lt;h1&gt;Hello, React!&lt;/h1&gt;;&lt;br&gt;
}

&lt;p&gt;export default Welcome;`&lt;/p&gt;

&lt;p&gt;Functional components are the preferred approach for most new React components.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. What Are Hooks?
&lt;/h2&gt;

&lt;p&gt;Hooks are special React functions that let functional components use React features such as state.&lt;/p&gt;

&lt;p&gt;useState() — manages state.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. What Is useState?
&lt;/h2&gt;

&lt;p&gt;useState is a React Hook that allows a component to store information and update its UI when that information changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Like Button 👍&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
&lt;/code&gt;import { useState } from 'react';&lt;/p&gt;

&lt;p&gt;function LikeButton() {&lt;br&gt;
  const [likes, setLikes] = useState(0);&lt;/p&gt;

&lt;p&gt;return (&lt;br&gt;
    &lt;/p&gt;
&lt;br&gt;
      &lt;h2&gt;Likes: {likes}&lt;/h2&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;button onClick={() =&amp;gt; setLikes(likes + 1)}&amp;gt;
    Like 👍
  &amp;lt;/button&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;export default LikeButton;`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;`What I Learned Today&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSX stands for JavaScript XML.&lt;/li&gt;
&lt;li&gt;JSX lets us write HTML-like markup inside JavaScript.&lt;/li&gt;
&lt;li&gt;React uses reusable components to organize user interfaces.&lt;/li&gt;
&lt;li&gt;React has class components and functional components.&lt;/li&gt;
&lt;li&gt;Functional components and Hooks are commonly used in modern React development.&lt;/li&gt;
&lt;li&gt;useState manages state and helps update the UI.&lt;/li&gt;
&lt;li&gt;The React root is where React renders and manages the application UI.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Day 22 of My Web Development Journey 🚀 | Meta Tags and Introduction to React.js</title>
      <dc:creator>Saravanan Cn</dc:creator>
      <pubDate>Fri, 23 Oct 2026 06:11:32 +0000</pubDate>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a/day-22-of-my-web-development-journey-meta-tags-and-introduction-to-reactjs-25mo</link>
      <guid>https://dev.to/saravanan_cn_183fcba7cc7a/day-22-of-my-web-development-journey-meta-tags-and-introduction-to-reactjs-25mo</guid>
      <description>&lt;p&gt;Today, I learned about HTML meta tags and started exploring React.js. I also learned the difference between a library and a framework and how to set up a React project using the terminal.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What Are Meta Tags in HTML?
&lt;/h2&gt;

&lt;p&gt;Meta tags provide information about a webpage to browsers and search engines. They are placed inside the  section of an HTML document.&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;&amp;lt;head&amp;gt;&lt;br&gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;&lt;br&gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;&lt;br&gt;
    &amp;lt;meta name="description" content="My web development learning journey"&amp;gt;&lt;br&gt;
    &amp;lt;title&amp;gt;My Website&amp;lt;/title&amp;gt;&lt;br&gt;
&amp;lt;/head&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;charset="UTF-8" supports a wide range of characters.&lt;/li&gt;
&lt;li&gt;name="viewport" helps webpages display properly on different screen sizes.&lt;/li&gt;
&lt;li&gt;name="description" provides a short description of the webpage.&lt;/li&gt;
&lt;li&gt; defines the title shown in the browser tab.&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&amp;lt;h2&amp;gt;
  &amp;lt;a name="2-introduction-to-reactjs" href="#2-introduction-to-reactjs" class="anchor"&amp;gt;
  &amp;lt;/a&amp;gt;
  2. Introduction to React.js
&amp;lt;/h2&amp;gt;

&amp;lt;p&amp;gt;React.js is a JavaScript library used to build user interfaces, especially interactive web applications.&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;React helps us divide a webpage into reusable pieces called components.&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;For example, an e-commerce website can have separate components for:&amp;lt;/p&amp;gt;

&amp;lt;ul&amp;gt;
&amp;lt;li&amp;gt;Navbar&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;Product card&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;Shopping cart&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;Footer&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;

&amp;lt;p&amp;gt;Instead of writing the same UI code repeatedly, we can reuse components.&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;3. What Is a Library?&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;A library is a collection of reusable code that helps developers perform particular tasks.&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;Example: React.js is a library that helps us build user interfaces.&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;We choose when and where to use the library in our application.&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;4. What Is a Framework?&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;A framework provides a broader structure for building an application and often guides how different parts of the application should work together.&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;Examples include Angular and Next.js, although Next.js is specifically a React framework.&amp;lt;br&amp;gt;
&amp;lt;strong&amp;gt;Library vs Framework&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Library&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;
Helps with particular tasks.&amp;lt;br&amp;gt;
we call its functions when needed.&amp;lt;br&amp;gt;
Example:ReactJS.&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Framework&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;
Provides a broader application structure.&amp;lt;br&amp;gt;
Often defines how the application is organized.&amp;lt;br&amp;gt;
Example:Angular,next js.&amp;lt;/p&amp;gt;
&amp;lt;h2&amp;gt;
  &amp;lt;a name="5-installing-react-using-the-terminal" href="#5-installing-react-using-the-terminal" class="anchor"&amp;gt;
  &amp;lt;/a&amp;gt;
  5. Installing React Using the Terminal
&amp;lt;/h2&amp;gt;

&amp;lt;p&amp;gt;I started setting up my React project using the terminal.&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;First, I checked whether Node.js and npm were installed.&amp;lt;br&amp;gt;
`&amp;lt;br&amp;gt;
node -v&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;npm -v`&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;Then, I created a React project using Vite:&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;npm create vite@latest my-react-app -- --template react&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;Next, I entered the project folder:&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;cd my-react-app&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;I installed the required dependencies:&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;npm install&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;Finally, I started the development server:&amp;lt;br&amp;gt;
&amp;lt;code&amp;gt;npm run dev&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;The terminal displays a local URL that I can open in my browser to view the React application.&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;What I Learned Today&amp;lt;/p&amp;gt;

&amp;lt;ul&amp;gt;
&amp;lt;li&amp;gt;The purpose of HTML meta tags.&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;The basics of React.js.&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;The difference between a library and a framework.&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;How to create and run a React project using the terminal.&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;How Node.js and npm help us set up a development environment.&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>react</category>
    </item>
    <item>
      <title>Day 21 of My JavaScript Learning Journey 🚀</title>
      <dc:creator>Saravanan Cn</dc:creator>
      <pubDate>Wed, 21 Oct 2026 15:03:38 +0000</pubDate>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a/day-21-of-my-javascript-learning-journey-5194</link>
      <guid>https://dev.to/saravanan_cn_183fcba7cc7a/day-21-of-my-javascript-learning-journey-5194</guid>
      <description>&lt;p&gt;Today, I learned about async and await and explored another concept related to closures in JavaScript.&lt;/p&gt;

&lt;p&gt;As I continue learning JavaScript, I’m starting to understand how asynchronous operations work and how functions can remember variables from their surrounding scope.&lt;/p&gt;

&lt;h2&gt;
  
  
  1.Async and Await in Javascript
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;async&lt;/strong&gt; and await helps us to work with promises and make synchronous code easier to understand&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;await&lt;/strong&gt; pauses the execution of the surrounding async function until a Promise settles, allowing us to work with its result.&lt;/p&gt;

&lt;p&gt;`async function greet() {&lt;br&gt;
    return "Hello, JavaScript!";&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;greet().then((result) =&amp;gt; {&lt;br&gt;
    console.log(result);&lt;br&gt;
});&lt;br&gt;
`&lt;/p&gt;

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

&lt;p&gt;Hello, JavaScript!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example using await&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;`function getData() {&lt;br&gt;
    return new Promise((resolve) =&amp;gt; {&lt;br&gt;
        resolve("Data received!");&lt;br&gt;
    });&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;async function displayData() {&lt;br&gt;
    let result = await getData();&lt;br&gt;
    console.log(result);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;displayData();&lt;br&gt;
`&lt;br&gt;
Output:&lt;/p&gt;

&lt;p&gt;Data received!&lt;/p&gt;

&lt;p&gt;Here, await waits for the Promise to fulfill and assigns its result to the result variable.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Closures in JavaScript
&lt;/h2&gt;

&lt;p&gt;A closure happens when a function remembers and can access variables from the scope where it was created, even after the outer function has finished executing.&lt;/p&gt;

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

&lt;p&gt;`function outerFunction() {&lt;br&gt;
    let message = "Hello from the outer function!";&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function innerFunction() {
    console.log(message);
}

return innerFunction;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;let myFunction = outerFunction();&lt;br&gt;
myFunction();`&lt;/p&gt;

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

&lt;p&gt;Hello from the outer function!&lt;/p&gt;

&lt;p&gt;In this example, innerFunction() can still access the message variable from outerFunction(). This is an example of a closure.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned Today
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;How async and await work with Promises.&lt;/li&gt;
&lt;li&gt;How asynchronous functions return Promises.&lt;/li&gt;
&lt;li&gt;How await helps us work with Promise results.&lt;/li&gt;
&lt;li&gt;What a closure is and how a function can remember variables from its surrounding scope.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>learning</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Day 20: Learning JavaScript setTimeout(), Synchronous vs Asynchronous Code &amp; Promises 🚀</title>
      <dc:creator>Saravanan Cn</dc:creator>
      <pubDate>Thu, 15 Oct 2026 16:41:39 +0000</pubDate>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a/day-20-learning-javascript-settimeout-synchronous-vs-asynchronous-code-promises-4p6a</link>
      <guid>https://dev.to/saravanan_cn_183fcba7cc7a/day-20-learning-javascript-settimeout-synchronous-vs-asynchronous-code-promises-4p6a</guid>
      <description>&lt;h2&gt;
  
  
  1. setTimeout()
&lt;/h2&gt;

&lt;p&gt;The setTimeout() method executes a callback function after a specified delay.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;setTimeout(() =&amp;gt; {&lt;br&gt;
    console.log("Hello JavaScript!");&lt;br&gt;
}, 2000);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here, the message is printed after approximately 2 seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Synchronous JavaScript
&lt;/h2&gt;

&lt;p&gt;Synchronous code executes one statement at a time, in order. Each statement normally finishes before the next one runs.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;console.log("First");&lt;br&gt;
console.log("Second");&lt;br&gt;
console.log("Third");&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;First&lt;br&gt;
Second&lt;br&gt;
Third&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Asynchronous JavaScript
&lt;/h2&gt;

&lt;p&gt;Asynchronous operations allow JavaScript to continue running other code while waiting for certain operations to complete.&lt;/p&gt;

&lt;p&gt;console.log("Start");&lt;/p&gt;

&lt;p&gt;setTimeout(() =&amp;gt; {&lt;br&gt;
    console.log("Inside timeout");&lt;br&gt;
}, 2000);&lt;/p&gt;

&lt;p&gt;console.log("End");&lt;/p&gt;

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

&lt;p&gt;Start&lt;br&gt;
End&lt;br&gt;
Inside timeout&lt;/p&gt;

&lt;p&gt;This helped me understand how JavaScript handles delayed operations.&lt;br&gt;
`&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Promise
&lt;/h2&gt;

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

&lt;p&gt;A Promise is a built-in JavaScript object that represents the eventual success or failure of an asynchronous operation.&lt;/p&gt;

&lt;p&gt;A Promise can be in one of three states:&lt;/p&gt;

&lt;p&gt;Pending — the operation is still in progress.&lt;/p&gt;

&lt;p&gt;Fulfilled — the operation completed successfully.&lt;/p&gt;

&lt;p&gt;Rejected — the operation failed.&lt;br&gt;
`&lt;br&gt;
let myPromise = new Promise((resolve, reject) =&amp;gt; {&lt;br&gt;
    resolve("Task completed!");&lt;br&gt;
});&lt;/p&gt;

&lt;p&gt;myPromise.then((result) =&amp;gt; {&lt;br&gt;
    console.log(result);&lt;br&gt;
});`&lt;/p&gt;

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

&lt;p&gt;Task completed!&lt;/p&gt;

&lt;p&gt;resolve() fullfills the promise and .then() handles the fullfilled result.&lt;/p&gt;

&lt;p&gt;Today I learned the difference between synchronous and asynchronous JavaScript, how setTimeout() schedules a callback, and how Promises represent the result of an asynchronous operation.&lt;/p&gt;

&lt;p&gt;These concepts are useful when fetching API data and working with my e-commerce website.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 19: Using JSON.stringify() and JSON.parse() in My E-Commerce Project 🛒</title>
      <dc:creator>Saravanan Cn</dc:creator>
      <pubDate>Wed, 14 Oct 2026 00:50:41 +0000</pubDate>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a/day-19-using-jsonstringify-and-jsonparse-in-my-e-commerce-project-c5o</link>
      <guid>https://dev.to/saravanan_cn_183fcba7cc7a/day-19-using-jsonstringify-and-jsonparse-in-my-e-commerce-project-c5o</guid>
      <description>&lt;p&gt;Today, I continued improving my e-commerce website using HTML, CSS, and JavaScript.&lt;/p&gt;

&lt;p&gt;I learned how to use JSON.stringify() and JSON.parse() with localStorage to store and retrieve cart data.&lt;/p&gt;

&lt;p&gt;WHAT I LEARNED &lt;/p&gt;

&lt;h2&gt;
  
  
  1.JSON.stringify()
&lt;/h2&gt;

&lt;p&gt;It converts my cart array into a JSON string so that I can store it in localStorage.&lt;/p&gt;

&lt;p&gt;localStorage.setItem("cart", JSON.stringify(cart));Today, I continued improving my e-commerce website using HTML, CSS, and JavaScript.&lt;/p&gt;

&lt;p&gt;I learned how to use JSON.stringify() and JSON.parse() with localStorage to store and retrieve cart data.&lt;/p&gt;

&lt;p&gt;ringify(cart));&lt;/p&gt;

&lt;h2&gt;
  
  
  2.JSON.parse()
&lt;/h2&gt;

&lt;p&gt;It converts the stored JSON string back into a JavaScript array.&lt;/p&gt;

&lt;p&gt;let savedCart = JSON.parse(localStorage.getItem("cart"));&lt;/p&gt;

&lt;p&gt;🛒 Applying it to my e-commerce website&lt;/p&gt;

&lt;p&gt;When a user adds a product to the cart, I can save the updated cart:&lt;/p&gt;

&lt;p&gt;cart.push(product);&lt;/p&gt;

&lt;p&gt;localStorage.setItem("cart", JSON.stringify(cart));&lt;/p&gt;

&lt;p&gt;When the page loads, I can restore the saved cart:&lt;/p&gt;

&lt;p&gt;let cart = JSON.parse(localStorage.getItem("cart")) || [];&lt;/p&gt;

&lt;p&gt;This allows the cart items to remain available after refreshing the page in the same browser.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>coding</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 18: Learning JavaScript addEventListener(), localStorage &amp; Nested Function Calls 🚀</title>
      <dc:creator>Saravanan Cn</dc:creator>
      <pubDate>Tue, 13 Oct 2026 11:11:42 +0000</pubDate>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a/day-18-learning-javascript-addeventlistener-localstorage-nested-function-calls-2pc4</link>
      <guid>https://dev.to/saravanan_cn_183fcba7cc7a/day-18-learning-javascript-addeventlistener-localstorage-nested-function-calls-2pc4</guid>
      <description>&lt;h2&gt;
  
  
  1. addEventListener()
&lt;/h2&gt;

&lt;p&gt;I learned how to use addEventListener() to respond to events such as button clicks.&lt;/p&gt;

&lt;p&gt;let button = document.getElementById("btn");&lt;/p&gt;

&lt;p&gt;button.addEventListener("click", () =&amp;gt; {&lt;br&gt;
    console.log("Button clicked!");&lt;br&gt;
});&lt;/p&gt;

&lt;h2&gt;
  
  
  2. localStorage
&lt;/h2&gt;

&lt;p&gt;I learned about localStorage, which allows us to store data in the browser so that it can remain available after refreshing or reopening the page.&lt;/p&gt;

&lt;p&gt;localStorage.setItem("username", "Saravanan");&lt;/p&gt;

&lt;p&gt;let name = localStorage.getItem("username");&lt;/p&gt;

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

&lt;p&gt;Here****&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;setItem() stores data.&lt;/li&gt;
&lt;li&gt;getItem() retrieves stored data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Calling Another Function Inside an Arrow Function
&lt;/h2&gt;

&lt;p&gt;I learned that an arrow function can call another function. This allows us to reuse code and organize our programs.&lt;/p&gt;

&lt;p&gt;function greet() {&lt;br&gt;
    console.log("Hello!");&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;let showMessage = () =&amp;gt; {&lt;br&gt;
    greet();&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;showMessage();&lt;/p&gt;

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

&lt;p&gt;greet() is a function declaration.&lt;/p&gt;

&lt;p&gt;showMessage is an arrow function.&lt;/p&gt;

&lt;p&gt;Inside the arrow function, greet() is called.&lt;/p&gt;

&lt;p&gt;Calling showMessage() executes the arrow function, which then calls greet().&lt;/p&gt;

&lt;p&gt;Note: Calling another function inside a function does not automatically make it a nested function. A nested function is specifically a function defined inside another function.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>coding</category>
      <category>beginners</category>
    </item>
    <item>
      <title>E-Commerce Product Listing Website using HTML, CSS, and JavaScript.</title>
      <dc:creator>Saravanan Cn</dc:creator>
      <pubDate>Sat, 10 Oct 2026 01:47:32 +0000</pubDate>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a/e-commerce-product-listing-website-using-html-css-and-javascript-3g9i</link>
      <guid>https://dev.to/saravanan_cn_183fcba7cc7a/e-commerce-product-listing-website-using-html-css-and-javascript-3g9i</guid>
      <description>&lt;p&gt;This project helped me practice JavaScript concepts and understand how to fetch product data from an API and display it dynamically on a webpage.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Fetching Product Data
&lt;/h2&gt;

&lt;p&gt;I used the JavaScript fetch() method to retrieve product data from the DummyJSON API.&lt;/p&gt;

&lt;p&gt;This project helped me practice JavaScript concepts and understand how to fetch product data from an API and display it dynamically on a webpage.&lt;/p&gt;

&lt;p&gt;🛠️ Technologies Used&lt;/p&gt;

&lt;p&gt;HTML — Created the webpage structure.&lt;/p&gt;

&lt;p&gt;CSS — Designed product cards using CSS Grid, Flexbox, shadows, and hover effects.&lt;/p&gt;

&lt;p&gt;JavaScript — Added functionality for fetching products, pagination, and cart management.&lt;/p&gt;

&lt;p&gt;DummyJSON API — Retrieved sample product data.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Dynamic Product Cards
&lt;/h2&gt;

&lt;p&gt;I used document.createElement() and appendChild() to create product cards dynamically using the data received from the API.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. CSS Grid Layout
&lt;/h2&gt;

&lt;p&gt;I used CSS Grid to display five product cards per row and added spacing between the cards.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Products Per Page
&lt;/h2&gt;

&lt;p&gt;I created a dropdown menu to select how many products to display per page: 10, 20, or 30.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Next and Back Buttons
&lt;/h2&gt;

&lt;p&gt;I implemented pagination using JavaScript variables such as limit and skip to navigate between product pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Add to Cart
&lt;/h2&gt;

&lt;p&gt;I used an array to store selected products and displayed the cart item count using JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Button Hover Effects
&lt;/h2&gt;

&lt;p&gt;I added CSS hover effects to make the buttons more interactive.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Day 16: Learning JavaScript DOM Manipulation — Create, Change &amp; Delete Elements</title>
      <dc:creator>Saravanan Cn</dc:creator>
      <pubDate>Fri, 09 Oct 2026 01:39:33 +0000</pubDate>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a/day-16-learning-javascript-dom-manipulation-create-change-delete-elements-3b7n</link>
      <guid>https://dev.to/saravanan_cn_183fcba7cc7a/day-16-learning-javascript-dom-manipulation-create-change-delete-elements-3b7n</guid>
      <description>&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff9e0qtn932oiylk216qc.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff9e0qtn932oiylk216qc.png" alt=" " width="800" height="384"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2km9xpim905dnchun3fm.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2km9xpim905dnchun3fm.png" alt=" " width="800" height="384"&gt;&lt;/a&gt;My webdevelopment learning journey continues  &lt;/p&gt;

&lt;p&gt;Today I learned about JavaScript DOM manipulation and how to create, modify, and delete HTML elements dynamically using JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. document.getElementById()
&lt;/h2&gt;

&lt;p&gt;Used to select an HTML element using its unique ID.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let heading = document.getElementById("title");&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. document.createElement()
&lt;/h2&gt;

&lt;p&gt;Used to create a new HTML element.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let newElement = document.createElement("p");&lt;br&gt;
newElement.textContent = "Hello JavaScript!";&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. appendChild()
&lt;/h2&gt;

&lt;p&gt;Used to add a new element as a child of another element.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;document.body.appendChild(newElement);&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Change Text
&lt;/h2&gt;

&lt;p&gt;`I learned how to change the text of an HTML element using JavaScript.&lt;/p&gt;

&lt;p&gt;document.getElementById("title").textContent = "Welcome!";`&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Change Image
&lt;/h2&gt;

&lt;p&gt;I learned how to change an image dynamically using the src property.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;document.getElementById("myImage").src = "new-image.jpg";&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Change Color
&lt;/h2&gt;

&lt;p&gt;I learned how to change the color of an element using JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;document.getElementById("title").style.color = "blue";&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Delete an HTML Element
&lt;/h2&gt;

&lt;p&gt;I learned how to remove an element from a webpage using the remove() method.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;document.getElementById("title").remove();&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. onclick
&lt;/h2&gt;

&lt;p&gt;I learned how to execute a JavaScript action when an element is clicked.&lt;/p&gt;

&lt;p&gt;`Click Me&lt;/p&gt;

&lt;p&gt;function changeText() {&lt;br&gt;
    document.getElementById("title").textContent = "Text Changed!";&lt;br&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdkin7xwexbk0pgcgoymn.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdkin7xwexbk0pgcgoymn.png" alt=" " width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>documentobjectmodel</category>
    </item>
    <item>
      <title>Day 15: Learning JavaScript Splice, Spread, Rest, Fetch, Promises &amp; Array Methods 🚀</title>
      <dc:creator>Saravanan Cn</dc:creator>
      <pubDate>Thu, 08 Oct 2026 02:00:02 +0000</pubDate>
      <link>https://dev.to/saravanan_cn_183fcba7cc7a/day-15-learning-javascript-splice-spread-rest-fetch-promises-array-methods-47bp</link>
      <guid>https://dev.to/saravanan_cn_183fcba7cc7a/day-15-learning-javascript-splice-spread-rest-fetch-promises-array-methods-47bp</guid>
      <description>&lt;p&gt;Today I learned several important JavaScript concepts, including array methods, spread and rest operators, fetch(), promises, arrow functions, and truthy/falsy values.&lt;/p&gt;

&lt;h2&gt;
  
  
  1.Splice
&lt;/h2&gt;

&lt;p&gt;I learned how &lt;code&gt;splice()&lt;/code&gt; can be used to add, remove, or replace elements in an array.&lt;br&gt;
&lt;code&gt;&lt;br&gt;
&lt;/code&gt;``javascript&lt;br&gt;
let fruits = ["Apple", "Banana", "Orange", "Mango"];&lt;/p&gt;

&lt;p&gt;fruits.splice(1, 1);&lt;/p&gt;

&lt;p&gt;console.log(fruits);`&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Spread Operator (...)
&lt;/h2&gt;

&lt;p&gt;The spread operator ... is used to expand the elements of an array or properties of an object.&lt;/p&gt;

&lt;p&gt;`let numbers = [1, 2, 3];&lt;/p&gt;

&lt;p&gt;let newNumbers = [...numbers, 4, 5];&lt;/p&gt;

&lt;p&gt;console.log(newNumbers);`&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Rest Parameter (...)
&lt;/h2&gt;

&lt;p&gt;The rest parameter ... collects multiple arguments into an array.&lt;/p&gt;

&lt;p&gt;`function add(...numbers) {&lt;br&gt;
    console.log(numbers);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;add(10, 20, 30);`&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Arrow Functions
&lt;/h2&gt;

&lt;p&gt;I learned that when an arrow function uses curly braces {}, we normally need a return statement if we want to return a value.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let add = (a, b) =&amp;gt; {&lt;br&gt;
    return a + b;&lt;br&gt;
};&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Without curly braces the value will be returned automatically.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let add = (a, b) =&amp;gt; a + b;&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. fetch()
&lt;/h2&gt;

&lt;p&gt;I learned about the fetch() method, which can be used to request data from a server or API.&lt;/p&gt;

&lt;p&gt;``fetch("&lt;a href="https://example.com/data%22" rel="noopener noreferrer"&gt;https://example.com/data"&lt;/a&gt;)&lt;br&gt;
    .then(response =&amp;gt; response.json())&lt;br&gt;
    .then(data =&amp;gt; console.log(data));&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Promise
&lt;/h2&gt;

&lt;p&gt;I also learned about Promises.&lt;br&gt;
A Promise is a JavaScript object that represents the eventual completion or failure of an asynchronous operation.&lt;br&gt;
fetch() returns a Promise, which is why we can use .then() with it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;fetch("https://example.com/data")&lt;br&gt;
    .then(response =&amp;gt; response.json())&lt;br&gt;
    .then(data =&amp;gt; console.log(data));&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. forEach()
&lt;/h2&gt;

&lt;p&gt;I used forEach() for iteration. It executes a function once for each element in an array.&lt;/p&gt;

&lt;p&gt;`let numbers = [1, 2, 3];&lt;/p&gt;

&lt;p&gt;numbers.forEach(function(number) {&lt;br&gt;
    console.log(number);&lt;br&gt;
});&lt;br&gt;
`&lt;/p&gt;

&lt;h2&gt;
  
  
  8. filter()
&lt;/h2&gt;

&lt;p&gt;I learned that filter() creates a new array containing elements that pass a condition.&lt;/p&gt;

&lt;p&gt;`let numbers = [1, 2, 3, 4, 5];&lt;/p&gt;

&lt;p&gt;let result = numbers.filter(number =&amp;gt; number &amp;gt; 2);&lt;/p&gt;

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

&lt;h2&gt;
  
  
  9. map()
&lt;/h2&gt;

&lt;p&gt;I also learned about map(). It creates a new array by transforming each element.`&lt;/p&gt;

&lt;p&gt;`let numbers = [1, 2, 3];&lt;/p&gt;

&lt;p&gt;let result = numbers.map(number =&amp;gt; number * 2);&lt;/p&gt;

&lt;p&gt;console.log(result);`&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Truthy and Falsy Values
&lt;/h2&gt;

&lt;p&gt;I learned about truthy and falsy values in JavaScript.&lt;br&gt;
Some falsy values include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;false&lt;/li&gt;
&lt;li&gt;0&lt;/li&gt;
&lt;li&gt;""&lt;/li&gt;
&lt;li&gt;null&lt;/li&gt;
&lt;li&gt;undefined&lt;/li&gt;
&lt;li&gt;NaN
Values that are not falsy are generally treated as truthy.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>learning</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
