<?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: hari A.G</title>
    <description>The latest articles on DEV Community by hari A.G (@its_harii).</description>
    <link>https://dev.to/its_harii</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%2F3140312%2F45da2e88-8be0-42dd-9723-1634bbbac383.jpg</url>
      <title>DEV Community: hari A.G</title>
      <link>https://dev.to/its_harii</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/its_harii"/>
    <language>en</language>
    <item>
      <title>DAY✌️OF JAVASCRIPT .JavaScript Variables and the DOM in HTML: A Beginner📚</title>
      <dc:creator>hari A.G</dc:creator>
      <pubDate>Fri, 30 May 2025 04:19:38 +0000</pubDate>
      <link>https://dev.to/its_harii/dayof-javascript-javascript-variables-and-the-dom-in-html-a-beginners-guide-75</link>
      <guid>https://dev.to/its_harii/dayof-javascript-javascript-variables-and-the-dom-in-html-a-beginners-guide-75</guid>
      <description>&lt;p&gt;JavaScript is the scripting language that brings interactivity to your websites. One of its most powerful features is the ability to manipulate the DOM (Document Object Model)—essentially the structure of your HTML—using variables.&lt;/p&gt;

&lt;p&gt;In this blog, we'll break down:&lt;/p&gt;

&lt;p&gt;•What variables are in JavaScript&lt;/p&gt;

&lt;p&gt;•How they interact with HTML through the DOM&lt;/p&gt;

&lt;p&gt;•Examples of how to use them effectively&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧠 What Are JavaScript Variables?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Variables in JavaScript are used to store data that you can use later in your code. Think of them as labeled containers for values like numbers, strings, or even entire HTML elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Declaring Variables&lt;/strong&gt;&lt;br&gt;
You can declare a variable using:&lt;br&gt;
let name = "John";  // Can be reassigned&lt;br&gt;
const age = 30;     // Cannot be reassigned&lt;br&gt;
var city = "Paris"; // Old way, less commonly used now&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🌿 Introduction to the DOM&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The DOM (Document Object Model) is a tree-like structure created by the browser from your HTML. It lets JavaScript read and manipulate elements on the page.&lt;/p&gt;

&lt;p&gt;Here’s a simple HTML example:&lt;br&gt;
&amp;lt;!DOCTYPE html&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;br&gt;
  JS and DOM&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
  &lt;h1 id="title"&gt;Welcome!&lt;/h1&gt;
&lt;br&gt;
  Click Me



&lt;p&gt;In this example, JavaScript can access and change the &lt;/p&gt;
&lt;h1&gt; element using the DOM.

&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;🛠️ Using Variables to Change the DOM&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s write the script.js:&lt;/p&gt;

&lt;p&gt;function changeTitle() {&lt;br&gt;
  let newTitle = "Hello, JavaScript!"; // Variable storing new text&lt;br&gt;
  document.getElementById("title").innerText = newTitle;&lt;br&gt;
}&lt;br&gt;
What’s Happening Here?&lt;/p&gt;

&lt;p&gt;•newTitle is a variable storing the new message.&lt;/p&gt;

&lt;p&gt;•document.getElementById("title") accesses the &lt;/p&gt;
&lt;h1&gt; element by its ID.

&lt;/h1&gt;
&lt;p&gt;•innerText = newTitle updates the content of the &lt;/p&gt;
&lt;h1&gt;.

&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;🔄 Dynamically Changing Styles&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can also use variables to change styles:&lt;/p&gt;

&lt;p&gt;function changeColor() {&lt;br&gt;
  let color = "blue";&lt;br&gt;
  document.getElementById("title").style.color = color;&lt;br&gt;
}&lt;br&gt;
This will change the &lt;/p&gt;
&lt;h1&gt; text color to blue when the function is called.

&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;🚀 Conclusion&lt;/strong&gt;&lt;br&gt;
JavaScript variables are fundamental building blocks that allow you to interact with HTML in powerful ways through the DOM. Once you understand how variables and the DOM work together, you can make your websites come alive with dynamic behavior.&lt;/p&gt;

&lt;p&gt;Next Step: Try building a simple form or interactive quiz using what you’ve learned. It’s a great way to solidify your understanding!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🚀DAY OF JAVASCRIPT 📘 Introduction to JavaScript Data Types and Functions.</title>
      <dc:creator>hari A.G</dc:creator>
      <pubDate>Thu, 29 May 2025 04:20:21 +0000</pubDate>
      <link>https://dev.to/its_harii/day-of-javascript-introduction-to-javascript-data-types-and-functions-5e2e</link>
      <guid>https://dev.to/its_harii/day-of-javascript-introduction-to-javascript-data-types-and-functions-5e2e</guid>
      <description>&lt;p&gt;JavaScript is a powerful and flexible programming language used to create interactive websites and web applications. Two of the core concepts every developer must understand are data types and functions. Let’s dive into each of these.&lt;/p&gt;

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

&lt;/div&gt;

&lt;p&gt;JavaScript Data Types&lt;br&gt;
In JavaScript, data types represent different kinds of values. They are mainly divided into two categories:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Primitive Data Types
These are the basic building blocks:&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;String&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;"Hello"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Text enclosed in quotes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Number&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;42&lt;/code&gt;, &lt;code&gt;3.14&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Integers and floating-point numbers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Boolean&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;true&lt;/code&gt;, &lt;code&gt;false&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Logical values&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Null&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Empty or non-existent value&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Undefined&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;undefined&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Variable declared but not assigned&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Symbol&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Symbol("id")&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unique and immutable value&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;BigInt&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1234567890123456789n&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Large integers beyond Number limits&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

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

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Non-Primitive (Reference) Data Types
These can hold multiple values or complex structures:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;•Object: { name: "John", age: 30 }&lt;/p&gt;

&lt;p&gt;•Array: [1, 2, 3]&lt;/p&gt;

&lt;p&gt;•Function: function() { ... }&lt;/p&gt;

&lt;p&gt;let name = "Alice";       // String&lt;br&gt;
let age = 25;             // Number&lt;br&gt;
let isStudent = true;     // Boolean&lt;br&gt;
let score = null;         // Null&lt;br&gt;
let address;              // Undefined&lt;br&gt;
let user = { name: "Bob", city: "NYC" }; // Object&lt;/p&gt;




&lt;p&gt;🔧 JavaScript Functions&lt;br&gt;
A function is a block of code designed to perform a particular task.&lt;/p&gt;

&lt;p&gt;Declaring a Function&lt;/p&gt;

&lt;p&gt;function greet(name) {&lt;br&gt;
  return "Hello, " + name + "!";&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;console.log(greet("Alice")); // Output: Hello, Alice!&lt;/p&gt;




&lt;p&gt;Function Expressions&lt;/p&gt;

&lt;p&gt;const add = function (a, b) {&lt;br&gt;
  return a + b;&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;console.log(add(2, 3)); // Output: 5&lt;/p&gt;




&lt;p&gt;Arrow Functions (ES6+)&lt;/p&gt;

&lt;p&gt;const multiply = (x, y) =&amp;gt; x * y;&lt;/p&gt;

&lt;p&gt;console.log(multiply(4, 5)); // Output: 20&lt;/p&gt;




&lt;p&gt;Why Use Functions?&lt;br&gt;
Code reusability&lt;/p&gt;

&lt;p&gt;Better organization&lt;/p&gt;

&lt;p&gt;Easier to test and debug&lt;/p&gt;

&lt;p&gt;📝 Conclusion&lt;br&gt;
Understanding data types and functions is fundamental in JavaScript. Mastering these basics lays the foundation for building dynamic and efficient applications.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
