<?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: Praveen Kumar K </title>
    <description>The latest articles on DEV Community by Praveen Kumar K  (@praveenkumarpraveen).</description>
    <link>https://dev.to/praveenkumarpraveen</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%2F3844083%2F84edc645-3dc6-4be3-864d-dafe0ef3e9d7.png</url>
      <title>DEV Community: Praveen Kumar K </title>
      <link>https://dev.to/praveenkumarpraveen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/praveenkumarpraveen"/>
    <language>en</language>
    <item>
      <title>Array iteration methods in javascript</title>
      <dc:creator>Praveen Kumar K </dc:creator>
      <pubDate>Wed, 15 Apr 2026 19:27:33 +0000</pubDate>
      <link>https://dev.to/praveenkumarpraveen/array-iteration-methods-in-javascript-49ea</link>
      <guid>https://dev.to/praveenkumarpraveen/array-iteration-methods-in-javascript-49ea</guid>
      <description>&lt;p&gt;🔹 1. forEach()&lt;br&gt;
Executes a function for each element in the array&lt;br&gt;
Does not return a new array.&lt;/p&gt;

&lt;p&gt;Program &lt;/p&gt;

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

&lt;p&gt;numbers.forEach(function(num) {&lt;br&gt;
  console.log(num * 2);&lt;br&gt;
});&lt;/p&gt;

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

&lt;p&gt;2&lt;br&gt;
4&lt;br&gt;
6&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;map()
Creates a new array by transforming each element&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

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

&lt;p&gt;let doubled = numbers.map(function(num) {&lt;br&gt;
  return num * 2;&lt;br&gt;
});&lt;/p&gt;

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

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

&lt;p&gt;[2, 4, 6]&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;filter()&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Returns a new array with elements that match a condition&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

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

&lt;p&gt;let even = numbers.filter(function(num) {&lt;br&gt;
  return num % 2 === 0;&lt;br&gt;
});&lt;/p&gt;

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

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

&lt;p&gt;[2, 4]&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;reduce()&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Reduces array to a single value&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

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

&lt;p&gt;let sum = numbers.reduce(function(total, num) {&lt;br&gt;
  return total + num;&lt;br&gt;
}, 0);&lt;/p&gt;

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

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

&lt;p&gt;10&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;find()&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Returns the first element that satisfies condition&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;let numbers = [1, 3, 5, 8];&lt;/p&gt;

&lt;p&gt;let result = numbers.find(function(num) {&lt;br&gt;
  return num &amp;gt; 4;&lt;br&gt;
});&lt;/p&gt;

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

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

&lt;p&gt;5&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;some()&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Returns true if any element satisfies condition&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

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

&lt;p&gt;let hasEven = numbers.some(function(num) {&lt;br&gt;
  return num % 2 === 0;&lt;br&gt;
});&lt;/p&gt;

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

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

&lt;p&gt;true&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;every()&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Returns true if all elements satisfy condition&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;let numbers = [2, 4, 6];&lt;/p&gt;

&lt;p&gt;let allEven = numbers.every(function(num) {&lt;br&gt;
  return num % 2 === 0;&lt;br&gt;
});&lt;/p&gt;

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

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

&lt;p&gt;true&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Why javascript is single thread?</title>
      <dc:creator>Praveen Kumar K </dc:creator>
      <pubDate>Tue, 14 Apr 2026 17:55:43 +0000</pubDate>
      <link>https://dev.to/praveenkumarpraveen/why-javascript-is-single-thread-2oo6</link>
      <guid>https://dev.to/praveenkumarpraveen/why-javascript-is-single-thread-2oo6</guid>
      <description>&lt;p&gt;JavaScript is a single-threaded language, meaning that it executes one operation at a time on a single thread. This characteristic is often misunderstood as a limitation, but JavaScript can still be non-blocking, which enables it to handle asynchronous operations like reading from a file, fetching data from an API, or waiting for user input without blocking the main thread.&lt;/p&gt;

&lt;p&gt;Let's explore how JavaScript achieves this, and why it's an important feature for web development.&lt;/p&gt;

&lt;p&gt;What Does Single-Threaded Mean?&lt;br&gt;
A single-threaded language means that only one operation or task can be executed at any given time. This is different from multi-threaded languages, where multiple tasks can run at the same time in separate threads.&lt;/p&gt;

&lt;p&gt;Single-Threaded Execution in JavaScript:&lt;/p&gt;

&lt;p&gt;JavaScript is traditionally single-threaded because it operates in a single execution context — there is one call stack where functions are pushed and popped as they are executed. In JavaScript, the call stack operates on a LIFO (Last In, First Out) basis, where functions are executed in the order they are pushed onto the stack.&lt;/p&gt;

&lt;p&gt;However, just because JavaScript is single-threaded doesn’t mean it’s inefficient or incapable of handling multiple tasks. The secret lies in JavaScript’s ability to handle asynchronous operations using non-blocking features.&lt;/p&gt;

&lt;p&gt;How Does JavaScript Achieve Non-Blocking Behavior?&lt;/p&gt;

&lt;p&gt;Even though JavaScript runs in a single thread, it can still perform tasks asynchronously without blocking the main thread. This is achieved through the use of the event loop, callback queues, and asynchronous APIs provided by the environment (like the browser or Node.js).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Event Loop&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The event loop is the mechanism that allows JavaScript to handle asynchronous operations while running in a single thread. It’s responsible for managing the execution of code, events, and messages in a non-blocking manner.&lt;/p&gt;

&lt;p&gt;Here’s how it works:&lt;/p&gt;

&lt;p&gt;Call Stack: JavaScript starts by pushing the execution context of functions onto the call stack, executing them one at a time.&lt;/p&gt;

&lt;p&gt;Web APIs / Node APIs: &lt;/p&gt;

&lt;p&gt;When JavaScript encounters asynchronous operations like setTimeout(), fetch(), or I/O operations in Node.js, it delegates these operations to the Web APIs (in the browser) or Node APIs (in Node.js).&lt;br&gt;
Callback Queue: After the asynchronous operation is complete, the callback (the function that was passed as an argument) is added to the callback queue.&lt;/p&gt;

&lt;p&gt;Event Loop: &lt;/p&gt;

&lt;p&gt;The event loop constantly monitors the call stack and the callback queue. If the call stack is empty (i.e., all synchronous code has been executed), the event loop pushes the first callback from the queue onto the call stack for execution.&lt;/p&gt;

&lt;p&gt;This process allows JavaScript to initiate tasks, move on to other tasks, and later return to handle the results of those tasks without blocking the execution of the main thread.&lt;/p&gt;

&lt;p&gt;Now, let us understand with the help of the example:&lt;/p&gt;

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

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

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

&lt;p&gt;Start&lt;br&gt;
End&lt;br&gt;
This is asynchronous.&lt;/p&gt;

&lt;p&gt;In this example:&lt;/p&gt;

&lt;p&gt;The first console.log("Start") is executed and removed from the stack.&lt;/p&gt;

&lt;p&gt;The setTimeout() function is encountered and placed in the call stack. It sets the callback function to await in the Web API (which handles the asynchronous operation), then the setTimeout() function is popped off the stack.&lt;/p&gt;

&lt;p&gt;The third console.log("End") is pushed onto the stack and executed, and then it's popped off.&lt;/p&gt;

&lt;p&gt;After 2 seconds, the callback function passed to setTimeout() is moved to the Callback Queue (or Event Queue), where it waits for the call stack to be empty.&lt;br&gt;
The Event Loop checks if the call stack is empty. Once it is, the callback function is pushed to the call stack, executed, and printed as "This is asynchronous".&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What are they primitive data types and non-primitive data types and difference?</title>
      <dc:creator>Praveen Kumar K </dc:creator>
      <pubDate>Thu, 09 Apr 2026 18:49:19 +0000</pubDate>
      <link>https://dev.to/praveenkumarpraveen/what-are-they-primitive-data-types-and-non-primitive-data-types-and-difference-2c1n</link>
      <guid>https://dev.to/praveenkumarpraveen/what-are-they-primitive-data-types-and-non-primitive-data-types-and-difference-2c1n</guid>
      <description>&lt;p&gt;Primitive and Non-primitive data-types in JavaScript.&lt;/p&gt;

&lt;p&gt;Variables hold values, and every value has a specific data type that defines the kind of information it holds. These data types are broadly categorized into two groups: Primitive Data Types and Non-Primitive Data Types. Let us discuss it one by one.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Primitive Data Types:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Primitive data types are the built-in data types provided by JavaScript. They represent single values and are not mutable. JavaScript supports the following primitive data types:&lt;/p&gt;

&lt;p&gt;1.1 Number:&lt;br&gt;
Number data type in JavaScript can be used to hold decimal values as well as values without decimals.&lt;/p&gt;

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

&lt;p&gt;let x = 250;&lt;br&gt;
    let y = 40.5;&lt;br&gt;
    console.log("Value of x=" + x);&lt;br&gt;
    console.log("Value of y=" + y);&lt;/p&gt;

&lt;p&gt;Output&lt;br&gt;
Value of x=250&lt;br&gt;
Value of y=40.5&lt;/p&gt;

&lt;p&gt;1.2 String:&lt;/p&gt;

&lt;p&gt;The string data type in JavaScript represents a sequence of characters that are surrounded by single or double quotes.&lt;/p&gt;

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

&lt;p&gt;let str = 'Hello All';&lt;br&gt;
let str1 = "Welcome to my new house";&lt;br&gt;
console.log("Value of str=" + str);&lt;br&gt;
console.log("Value of str1=" + str1);&lt;/p&gt;

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

&lt;p&gt;Value of str=Hello All&lt;br&gt;
Value of str1=Welcome to my new house&lt;/p&gt;

&lt;p&gt;1.3 Undefined:&lt;/p&gt;

&lt;p&gt;This means that a variable has been declared but has not been assigned a value, or it has been explicitly set to the value &lt;code&gt;undefined&lt;/code&gt;.&lt;/p&gt;

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

&lt;p&gt;let x;&lt;br&gt;
console.log(x); // Outputs: undefined&lt;/p&gt;

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

&lt;p&gt;Screenshot-(6)&lt;br&gt;
undefined output&lt;/p&gt;

&lt;p&gt;1.4 Boolean:&lt;br&gt;
The boolean data type can accept only two values i.e. true and false.&lt;/p&gt;

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

&lt;p&gt;let x;&lt;br&gt;
console.log(x); // Outputs: undefined&lt;/p&gt;

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

&lt;p&gt;Click to enlarge&lt;br&gt;
boolean output&lt;/p&gt;

&lt;p&gt;1.5 Null:&lt;/p&gt;

&lt;p&gt;This data type can hold only one possible value that is null.&lt;/p&gt;

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

&lt;p&gt;let x = null;&lt;br&gt;
    console.log("Value of x=" + x);&lt;/p&gt;

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

&lt;p&gt;Value of x=null&lt;/p&gt;

&lt;p&gt;1.6 BigInt:&lt;/p&gt;

&lt;p&gt;BigInt data type can represent numbers greater than 253-1 which helps to perform operations on large numbers. The number is specified by writing 'n' at the end of the value&lt;/p&gt;

&lt;p&gt;Example: Below is an example.&lt;/p&gt;

&lt;p&gt;let bigNum = 123422222222222222222222222222222222222n&lt;br&gt;
console.log(bigNum)&lt;/p&gt;

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

&lt;p&gt;123422222222222222222222222222222222222n&lt;/p&gt;

&lt;p&gt;1.7 Symbol:&lt;/p&gt;

&lt;p&gt;Symbol data type is used to create objects which will always be unique. these objects can be created using Symbol constructor.&lt;/p&gt;

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

&lt;p&gt;let sym = Symbol("Hello")&lt;br&gt;
console.log(typeof(sym));&lt;br&gt;
console.log(sym);&lt;/p&gt;

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

&lt;p&gt;symbol&lt;br&gt;
Symbol(Hello)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Non-primitive Data Types:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Non-primitive data types, also known as reference types, are objects and derived data types. They can store collections of values or more complex entities. The two key non-primitive data types in JavaScript are:&lt;/p&gt;

&lt;p&gt;2.1 Object:&lt;/p&gt;

&lt;p&gt;An object in Javascript is an entity having properties and methods. Everything is an object in javascript.&lt;/p&gt;

&lt;p&gt;How to create an object in javascript:&lt;/p&gt;

&lt;p&gt;Using Constructor Function to define an object:&lt;/p&gt;

&lt;p&gt;// Create an empty generic object&lt;br&gt;
let obj = new Object();&lt;/p&gt;

&lt;p&gt;// Create a user defined object&lt;/p&gt;

&lt;p&gt;let mycar = new Car();&lt;br&gt;
Using Literal notations to define an object:&lt;/p&gt;

&lt;p&gt;// An empty object&lt;br&gt;
let square = {};&lt;/p&gt;

&lt;p&gt;// Here a and b are keys and&lt;br&gt;
// 20 and 30 are values&lt;br&gt;
let circle = {a: 20, b: 30};&lt;/p&gt;

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

&lt;p&gt;// Creating object with the name person&lt;br&gt;
    let person = {&lt;br&gt;
        firstName: "MS",&lt;br&gt;
        lastName: "Praveen",&lt;br&gt;
    };&lt;br&gt;
​&lt;br&gt;
    // Print the value of object on console&lt;br&gt;
    console.log(person.firstName &lt;br&gt;
        + "  " + person.lastName);&lt;/p&gt;

&lt;p&gt;Output&lt;br&gt;
MS Praveen&lt;/p&gt;

&lt;p&gt;2.2 Array:&lt;/p&gt;

&lt;p&gt;With the help of an array, we can store more than one element under a single name.&lt;/p&gt;

&lt;p&gt;Ways to declare a single-dimensional array:&lt;/p&gt;

&lt;p&gt;// Call it with no arguments&lt;br&gt;
let a = new Array();&lt;/p&gt;

&lt;p&gt;// Call it with single numeric argument&lt;br&gt;
let b = new Array(10);&lt;/p&gt;

&lt;p&gt;// Explicitly specify two or&lt;br&gt;
// more array elements&lt;br&gt;
let d = new Array(1, 2, 3, "Hello");&lt;/p&gt;

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

&lt;p&gt;let a = new Array();&lt;br&gt;
    let b = new Array(10);&lt;br&gt;
    let d = new Array(1, 2, 3, "Hello");&lt;br&gt;
    console.log("value of a=" + a);&lt;br&gt;
    console.log("value of b" + b);&lt;br&gt;
    console.log("value of d=" + d);&lt;/p&gt;

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

&lt;p&gt;value of a=&lt;br&gt;
value of b,,,,,,,,,&lt;br&gt;
value of d=1,2,3,Hello&lt;/p&gt;

&lt;p&gt;Note: JavaScript does not support two-dimensional arrays. but we can do this by creating an array of an array.&lt;/p&gt;




&lt;p&gt;Primitive data types:&lt;/p&gt;

&lt;p&gt;Primitive Data types are predefined.&lt;/p&gt;

&lt;p&gt;Primitive Data types will have certain values.  &lt;/p&gt;

&lt;p&gt;Size depends on the type of data structure.&lt;/p&gt;

&lt;p&gt;Examples are numbers and strings.   &lt;/p&gt;

&lt;p&gt;It can start with a lowercase.&lt;/p&gt;

&lt;p&gt;Non-primitive data types:&lt;/p&gt;

&lt;p&gt;Non-Primitive data types are created by the programmer&lt;br&gt;
Primitive Data types will have certain values.  &lt;/p&gt;

&lt;p&gt;Non-Primitive data types can be NULL.&lt;/p&gt;

&lt;p&gt;Size is not fixed.&lt;/p&gt;

&lt;p&gt;Examples are Array and Linked List.&lt;/p&gt;

&lt;p&gt;It can start with uppercase.&lt;/p&gt;

&lt;p&gt;Reference website geeksforgeeks.org&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Methods in JavaScript?</title>
      <dc:creator>Praveen Kumar K </dc:creator>
      <pubDate>Wed, 08 Apr 2026 16:55:34 +0000</pubDate>
      <link>https://dev.to/praveenkumarpraveen/methods-in-javascript-58ea</link>
      <guid>https://dev.to/praveenkumarpraveen/methods-in-javascript-58ea</guid>
      <description>&lt;ol&gt;
&lt;li&gt;push() → Add element at end
Adds a new element to the end of the array.[]&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;let fruits = ["apple", "banana"];&lt;br&gt;
fruits.push("mango");&lt;/p&gt;

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

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

&lt;p&gt;["apple", "banana", "mango"]&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;pop() → Remove last element
Removes the last item from the array.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;let fruits = ["apple", "banana", "mango"];&lt;br&gt;
fruits.pop();&lt;/p&gt;

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

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

&lt;p&gt;["apple", "banana"]&lt;/p&gt;

&lt;p&gt;✔️ Use when removing the latest item&lt;/p&gt;

&lt;p&gt;🔹 3. shift() → Remove first element&lt;/p&gt;

&lt;p&gt;Removes the first element.&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;let fruits = ["apple", "banana", "mango"];&lt;br&gt;
fruits.shift();&lt;/p&gt;

&lt;p&gt;console.log(fruits);&lt;br&gt;
// ["banana", "mango"]&lt;/p&gt;

&lt;p&gt;👉 Use when removing from start&lt;/p&gt;

&lt;p&gt;🔹 4. unshift() → Add at beginning&lt;/p&gt;

&lt;p&gt;Adds element to the start of array.&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;let fruits = ["banana", "mango"];&lt;br&gt;
fruits.unshift("apple");&lt;/p&gt;

&lt;p&gt;console.log(fruits);&lt;br&gt;
// ["apple", "banana", "mango"]&lt;/p&gt;

&lt;p&gt;👉 Use when adding at start&lt;/p&gt;

&lt;p&gt;🔹 5. length → Find array size&lt;br&gt;
Gives total number of elements.&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;let fruits = ["apple", "banana", "mango"];&lt;br&gt;
console.log(fruits.length);&lt;br&gt;
// 3&lt;/p&gt;

&lt;p&gt;👉 Useful for loops and counting&lt;/p&gt;

&lt;p&gt;🔹 6. includes() → Check value exists&lt;/p&gt;

&lt;p&gt;Checks if a value is present in array.&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;let fruits = ["apple", "banana", "mango"];&lt;br&gt;
console.log(fruits.includes("banana"));&lt;br&gt;
// true&lt;/p&gt;

&lt;p&gt;👉 Returns true or false&lt;/p&gt;

&lt;p&gt;🔹 7. indexOf() → Find position&lt;/p&gt;

&lt;p&gt;Returns index (position) of element.&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;let fruits = ["apple", "banana", "mango"];&lt;br&gt;
console.log(fruits.indexOf("mango"));&lt;br&gt;
// 2&lt;/p&gt;

&lt;p&gt;👉 If not found → returns -1&lt;/p&gt;

&lt;p&gt;🔹 8. join() → Convert array to string&lt;/p&gt;

&lt;p&gt;Joins all elements into a string.&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;let fruits = ["apple", "banana", "mango"];&lt;br&gt;
console.log(fruits.join(", "));&lt;br&gt;
// "apple, banana, mango"&lt;/p&gt;

&lt;p&gt;👉 Useful for displaying data&lt;/p&gt;

&lt;p&gt;🔹 9. slice() → Get part of array&lt;br&gt;
Returns a portion of array (does not change original).&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;let fruits = ["apple", "banana", "mango"];&lt;br&gt;
console.log(fruits.slice(0, 2));&lt;br&gt;
// ["apple", "banana"]&lt;/p&gt;

&lt;p&gt;👉 Start index included, end index excluded&lt;/p&gt;

&lt;p&gt;🔹 10. splice() → Add/Remove elements&lt;/p&gt;

&lt;p&gt;Changes the original array.&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;let fruits = ["apple", "banana", "mango"];&lt;br&gt;
fruits.splice(1, 1);&lt;/p&gt;

&lt;p&gt;console.log(fruits);&lt;br&gt;
// ["apple", "mango"]&lt;/p&gt;

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

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;array.splice(start, deleteCount, newItem)&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What is constructor in JavaScript?</title>
      <dc:creator>Praveen Kumar K </dc:creator>
      <pubDate>Tue, 07 Apr 2026 14:06:11 +0000</pubDate>
      <link>https://dev.to/praveenkumarpraveen/what-is-constructor-in-javascript-3cej</link>
      <guid>https://dev.to/praveenkumarpraveen/what-is-constructor-in-javascript-3cej</guid>
      <description>&lt;p&gt;In JavaScript, a constructor is a special function used to create and initialize objects.&lt;br&gt;
Simple idea&lt;/p&gt;

&lt;p&gt;A constructor is like a blueprint for creating multiple similar objects.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Constructor function 
(old/classic way):&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;function Person(name, age) {&lt;br&gt;
  this.name = name;&lt;br&gt;
  this.age = age;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;const p1 = new Person("Praveen", 25);&lt;br&gt;
const p2 = new Person("Kumar", 30);&lt;/p&gt;

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

&lt;p&gt;Key points:&lt;/p&gt;

&lt;p&gt;The function name usually starts with a capital letter.&lt;br&gt;
The new keyword is used to call the constructor.&lt;br&gt;
this refers to the new object being created.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Constructor in ES6 class (modern way):&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;class Person {&lt;br&gt;
  constructor(name, age) {&lt;br&gt;
    this.name = name;&lt;br&gt;
    this.age = age;&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;const p1 = new Person("Praveen", 22);&lt;/p&gt;

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

&lt;p&gt;constructor() is a special method inside a class.&lt;br&gt;
It runs automatically when you create an object with new.&lt;/p&gt;

&lt;p&gt;What happens when you use new?&lt;br&gt;
When you do:&lt;/p&gt;

&lt;p&gt;const p = new Person("Praveen", 22);&lt;/p&gt;

&lt;p&gt;JavaScript:&lt;/p&gt;

&lt;p&gt;Creates a new empty object&lt;br&gt;
Sets this to that object&lt;br&gt;
Runs the constructor function&lt;br&gt;
Returns the object.&lt;/p&gt;

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

&lt;p&gt;pop()&lt;br&gt;
shift()&lt;br&gt;
unshift()&lt;br&gt;
forEach()&lt;br&gt;
map()&lt;br&gt;
filter()&lt;br&gt;
reduce()&lt;br&gt;
find()&lt;br&gt;
findIndex()&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What is object?</title>
      <dc:creator>Praveen Kumar K </dc:creator>
      <pubDate>Mon, 06 Apr 2026 11:25:05 +0000</pubDate>
      <link>https://dev.to/praveenkumarpraveen/what-is-object-4g96</link>
      <guid>https://dev.to/praveenkumarpraveen/what-is-object-4g96</guid>
      <description>&lt;p&gt;An object is a collection of data stored as key–value pairs.&lt;/p&gt;

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

&lt;p&gt;JavaScript:&lt;/p&gt;

&lt;p&gt;let person = {&lt;br&gt;
  name: "Praveen",&lt;br&gt;
  age: 22,&lt;br&gt;
  city: "Chennai"&lt;br&gt;
};&lt;/p&gt;

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

&lt;p&gt;👉 Here:&lt;br&gt;
name, age, city → keys&lt;br&gt;
"Praveen", 22, "Chennai" → values&lt;/p&gt;

&lt;p&gt;Object Inside Object (Nested Object):&lt;/p&gt;

&lt;p&gt;Program:&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%2Fje2z87t4b84ud7t3uu0u.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%2Fje2z87t4b84ud7t3uu0u.jpg" alt=" " width="800" height="1794"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Output:&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%2Fh8z3pr20g6w8ve30xkm1.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%2Fh8z3pr20g6w8ve30xkm1.jpg" alt=" " width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>devops</category>
    </item>
    <item>
      <title>What is Function and it's types?</title>
      <dc:creator>Praveen Kumar K </dc:creator>
      <pubDate>Sun, 05 Apr 2026 18:11:04 +0000</pubDate>
      <link>https://dev.to/praveenkumarpraveen/what-is-function-and-its-types-5ego</link>
      <guid>https://dev.to/praveenkumarpraveen/what-is-function-and-its-types-5ego</guid>
      <description>&lt;p&gt;A function is a block of code designed to perform a specific task. It runs only when it is called (invoked), and it helps make code reusable, clean, and easy to manage.&lt;/p&gt;

&lt;p&gt;Program:&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("Praveen"));&lt;/p&gt;

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

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

&lt;p&gt;Types of Functions (in JavaScript)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Function Declaration:
A normal function defined using the function keyword.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Program:&lt;/p&gt;

&lt;p&gt;function add(a, b) {&lt;br&gt;
    return a + b;&lt;br&gt;
}&lt;br&gt;
✔ Can be called before declaration.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Function Expression:
Function stored in a variable.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;const multiply = function(a, b) {&lt;br&gt;
    return a * b;&lt;br&gt;
};&lt;br&gt;
✔ Cannot be called before definition.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Arrow Function (ES6):
Short and modern syntax.
Program:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;const subtract = (a, b) =&amp;gt; a - b;&lt;br&gt;
✔ Clean and simple&lt;br&gt;
✔ No function keyword needed.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Anonymous Function:
Function without a name.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Program:&lt;/p&gt;

&lt;p&gt;setTimeout(function() {&lt;br&gt;
    console.log("Hello");&lt;br&gt;
}, 1000);&lt;br&gt;
✔ Mostly used as arguments.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;IIFE (Immediately Invoked Function Expression)
Runs immediately after creation.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Program:&lt;/p&gt;

&lt;p&gt;(function() {&lt;br&gt;
    console.log("Executed immediately");&lt;br&gt;
})();&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Callback Function:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A function passed as an argument to another function.&lt;/p&gt;

&lt;p&gt;Program:&lt;/p&gt;

&lt;p&gt;function processUser(name, callback) {&lt;br&gt;
    callback(name);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;processUser("Praveen", function(name) {&lt;br&gt;
    console.log("Hello " + name);&lt;br&gt;
});&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Recursive Function:
A function that calls itself.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Program:&lt;/p&gt;

&lt;p&gt;function factorial(n) {&lt;br&gt;
    if (n === 0) return 1;&lt;br&gt;
    return n * factorial(n - 1);&lt;br&gt;
}&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>devops</category>
    </item>
    <item>
      <title>Define Function in Javascript?</title>
      <dc:creator>Praveen Kumar K </dc:creator>
      <pubDate>Fri, 03 Apr 2026 18:12:28 +0000</pubDate>
      <link>https://dev.to/praveenkumarpraveen/define-function-in-javascript-n9a</link>
      <guid>https://dev.to/praveenkumarpraveen/define-function-in-javascript-n9a</guid>
      <description>&lt;p&gt;Step 1:&lt;/p&gt;

&lt;p&gt;What are Functions?&lt;br&gt;
Functions are reusable code blocks designed for particular tasks.&lt;br&gt;
Functions are executed when they are called or invoked&lt;br&gt;
Functions are fundamental in all programming languages.&lt;/p&gt;

&lt;p&gt;Step 2:&lt;/p&gt;

&lt;p&gt;Calling Functions:&lt;/p&gt;

&lt;p&gt;Functions are executed when they are called or invoked&lt;br&gt;
You call a function by adding parentheses to its name: name().&lt;/p&gt;

&lt;p&gt;Step 3:&lt;/p&gt;

&lt;p&gt;Function Parameters:&lt;/p&gt;

&lt;p&gt;Parameters allow you to send values to a function.&lt;br&gt;
Parameters are listed in parentheses in the function definition.&lt;/p&gt;

&lt;p&gt;Step 4:&lt;/p&gt;

&lt;p&gt;Function Return Values:&lt;/p&gt;

&lt;p&gt;A function can return a value back to the code that called it.&lt;br&gt;
The return statement is used to return a value from a function.&lt;/p&gt;

&lt;p&gt;Step 5:&lt;/p&gt;

&lt;p&gt;Function Arguments:&lt;/p&gt;

&lt;p&gt;Function parameters and arguments are distinct concepts.&lt;br&gt;
Parameters are the names listed in the function definition.&lt;br&gt;
Arguments are the values received by the function.&lt;/p&gt;

&lt;p&gt;Step 6:&lt;/p&gt;

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

&lt;p&gt;A function expression is a function stored in a variable&lt;br&gt;
The variable name can be used to call the function.&lt;/p&gt;

&lt;p&gt;Step 7:&lt;/p&gt;

&lt;p&gt;Arrow Functions:&lt;/p&gt;

&lt;p&gt;Arrow Functions is a short syntax for function expressions.&lt;br&gt;
You can skip the function keyword.&lt;br&gt;
You can skip the return keyword.&lt;br&gt;
You can skip the curly brackets.&lt;/p&gt;

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

&lt;p&gt;![ ](&lt;a href="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wg76mxv3uy34yoy80yvy.jpg" rel="noopener noreferrer"&gt;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wg76mxv3uy34yoy80yvy.jpg&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Simple Program and Output:&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%2F5v2kvq2y94v1jgeuhxi5.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%2F5v2kvq2y94v1jgeuhxi5.jpg" alt=" " width="800" height="1360"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Write a program to find the total marks, average and Grade using while loop.</title>
      <dc:creator>Praveen Kumar K </dc:creator>
      <pubDate>Thu, 02 Apr 2026 15:21:18 +0000</pubDate>
      <link>https://dev.to/praveenkumarpraveen/write-a-program-to-find-the-total-marks-average-and-grade-using-while-loop-35e7</link>
      <guid>https://dev.to/praveenkumarpraveen/write-a-program-to-find-the-total-marks-average-and-grade-using-while-loop-35e7</guid>
      <description>&lt;p&gt;PROGRAM:&lt;br&gt;
const marks=[96,65,64,74,80];&lt;br&gt;
let i=0;&lt;br&gt;
let failCount=0;&lt;br&gt;
let total=0;&lt;br&gt;
let average=0;&lt;br&gt;
let j=0;&lt;br&gt;
while(i if(marks[i]&amp;lt;35){&lt;br&gt;
fcount++;&lt;br&gt;
}&lt;br&gt;
i++&lt;br&gt;
}&lt;br&gt;
console.log("FailCount",failCount);&lt;br&gt;
if(failCount&amp;gt;0){&lt;br&gt;
console.log("no grade")&lt;br&gt;
}&lt;br&gt;
else{&lt;br&gt;
j=0;&lt;br&gt;
while(j total+=marks[j];&lt;br&gt;
j++;&lt;br&gt;
}&lt;br&gt;
}&lt;br&gt;
console.log("Total",total);&lt;br&gt;
average=Math.floor(total/marks.length);&lt;br&gt;
console.log("Average",average);&lt;br&gt;
if(failCount==0){&lt;br&gt;
if(average&amp;gt;=90){&lt;br&gt;
console.log("grade A");&lt;br&gt;
}&lt;br&gt;
else if(average&amp;gt;=80){&lt;br&gt;
console.log("grade B");&lt;br&gt;
}&lt;br&gt;
else if(average&amp;gt;=70 ){&lt;br&gt;
console.log("grade C");&lt;br&gt;
}&lt;br&gt;
else if(average&amp;gt;=60){&lt;br&gt;
console.log("grade D");&lt;br&gt;
}&lt;br&gt;
else{&lt;br&gt;
console.log("grade E")&lt;br&gt;
}&lt;br&gt;
}&lt;br&gt;
OUTPUT:&lt;br&gt;
FailCount 0&lt;br&gt;
Total 379&lt;br&gt;
Average 75&lt;br&gt;
grade B&lt;/p&gt;

&lt;p&gt;Flowchart for Program:&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%2F0cd51sm1ueoz775k79hy.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%2F0cd51sm1ueoz775k79hy.jpg" alt=" " width="800" height="531"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Flowchart for looping:</title>
      <dc:creator>Praveen Kumar K </dc:creator>
      <pubDate>Fri, 27 Mar 2026 09:09:47 +0000</pubDate>
      <link>https://dev.to/praveenkumarpraveen/flowchart-for-looping-50ol</link>
      <guid>https://dev.to/praveenkumarpraveen/flowchart-for-looping-50ol</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.amazonaws.com%2Fuploads%2Farticles%2Fd0zxw4ojcdfiz7xjb8pr.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%2Fd0zxw4ojcdfiz7xjb8pr.jpg" alt=" " width="800" height="1793"&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%2F9h1c8bvtvehg9yctpj8h.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%2F9h1c8bvtvehg9yctpj8h.jpg" alt=" " width="800" height="1793"&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%2Fm1fyu3ohw6z8ans6whqn.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%2Fm1fyu3ohw6z8ans6whqn.jpg" alt=" " width="800" height="1793"&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%2Fkgnvs7i5t5kzk8oq9nby.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%2Fkgnvs7i5t5kzk8oq9nby.jpg" alt=" " width="800" height="1793"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
    </item>
    <item>
      <title>What is JavaScript?</title>
      <dc:creator>Praveen Kumar K </dc:creator>
      <pubDate>Thu, 26 Mar 2026 09:43:28 +0000</pubDate>
      <link>https://dev.to/praveenkumarpraveen/what-is-javascript-2elm</link>
      <guid>https://dev.to/praveenkumarpraveen/what-is-javascript-2elm</guid>
      <description>&lt;p&gt;JavaScript (JS) is a high-level, interpreted programming language mainly used to make websites interactive and dynamic. It runs inside the browser and allows you to control webpage behavior like clicking buttons, showing messages, validating forms, etc.&lt;br&gt;
It is one of the core technologies of the web along with:&lt;/p&gt;

&lt;p&gt;•HTML → Structure&lt;br&gt;
•CSS → Styling&lt;br&gt;
•JavaScript → Behavior&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features of JavaScript&lt;br&gt;
Client-side scripting (runs in browser)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;•Dynamic typing (no need to declare data types)&lt;br&gt;
•Event-driven (responds to user actions like clicks)&lt;br&gt;
•Object-oriented (supports objects and classes)&lt;br&gt;
•Asynchronous (handles tasks like API calls)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple JavaScript Code:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;br&gt;
  JavaScript Example
&lt;br&gt;
&lt;br&gt;


&lt;h2 id="demo"&gt;Hello World&lt;/h2&gt;

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


function changeText() {
  document.getElementById("demo").innerHTML = "Text Changed!";
}




&lt;p&gt;Explanation:&lt;/p&gt;

&lt;p&gt;•button → When clicked, it calls a function&lt;br&gt;
•changeText() → JavaScript function&lt;br&gt;
•document.getElementById() → Selects HTML element&lt;br&gt;
•innerHTML → Changes the content&lt;/p&gt;

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