<?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</title>
    <description>The latest articles on DEV Community by Praveen (@praveenv2426).</description>
    <link>https://dev.to/praveenv2426</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%2F3869332%2Ff8386b29-a90e-48d3-b81e-05c26200660e.png</url>
      <title>DEV Community: Praveen</title>
      <link>https://dev.to/praveenv2426</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/praveenv2426"/>
    <language>en</language>
    <item>
      <title>useReducer hook in react</title>
      <dc:creator>Praveen</dc:creator>
      <pubDate>Fri, 05 Jun 2026 04:15:09 +0000</pubDate>
      <link>https://dev.to/praveenv2426/usereducer-hook-in-react-45ap</link>
      <guid>https://dev.to/praveenv2426/usereducer-hook-in-react-45ap</guid>
      <description>&lt;p&gt;The useReducer hook is an alternative to the useState hook that is preferred when you have complex state logic. It is useful when the state transitions depend on previous state values or when you need to handle actions that can update the state differently.&lt;/p&gt;

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

&lt;p&gt;const [state, dispatch] = useReducer(reducer, initialState);&lt;/p&gt;


&lt;p&gt;reducer: A function that defines how the state should be updated based on the action. It takes two parameters: the current state and the action.&lt;br&gt;&lt;br&gt;
initialState: The initial value of the state.&lt;br&gt;&lt;br&gt;
State The current state returned from the useReducer hook.&lt;br&gt;&lt;br&gt;
dispatch: A function used to send an action to the reducer to update the state&lt;br&gt;&lt;br&gt;
state.count&lt;br&gt;&lt;br&gt;
import React, { useReducer } from 'react';&lt;br&gt;&lt;br&gt;
const counterReducer = (state, action) =&amp;gt; {&lt;br&gt;&lt;br&gt;
    switch (action.type) {&lt;br&gt;&lt;br&gt;
        case 'INCREMENT':&lt;br&gt;&lt;br&gt;
            return { count: state.count + 1 };&lt;br&gt;&lt;br&gt;
        case 'DECREMENT':&lt;br&gt;&lt;br&gt;
            return { count: state.count - 1 };&lt;br&gt;&lt;br&gt;
case 'reset':&lt;br&gt;&lt;br&gt;
            return { count:0 };&lt;br&gt;&lt;br&gt;
        default:&lt;br&gt;&lt;br&gt;
            return state;&lt;br&gt;&lt;br&gt;
    }&lt;br&gt;&lt;br&gt;
};&lt;br&gt;&lt;br&gt;
function Counter() {&lt;br&gt;&lt;br&gt;
    const [state, dispatch] = useReducer(counterReducer, { count: 0 });&lt;br&gt;&lt;br&gt;
    return (&lt;br&gt;&lt;br&gt;
        &lt;/p&gt;
&lt;br&gt;&lt;br&gt;
            &lt;p&gt;Count: {state.count}&lt;/p&gt;
&lt;br&gt;&lt;br&gt;
             dispatch({ type: 'INCREMENT' })}&amp;gt;Increment&lt;br&gt;&lt;br&gt;
             dispatch({ type: 'DECREMENT' })}&amp;gt;Decrement&lt;br&gt;&lt;br&gt;
button onClick={() =&amp;gt; dispatch({ type: 'reset' })}&amp;gt;Decrement&lt;br&gt;&lt;br&gt;
        &lt;br&gt;&lt;br&gt;
    );&lt;br&gt;&lt;br&gt;
}&lt;br&gt;&lt;br&gt;
export default Counter;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>react</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Closure in javascript</title>
      <dc:creator>Praveen</dc:creator>
      <pubDate>Thu, 07 May 2026 07:45:07 +0000</pubDate>
      <link>https://dev.to/praveenv2426/closure-in-javascript-1ej1</link>
      <guid>https://dev.to/praveenv2426/closure-in-javascript-1ej1</guid>
      <description>&lt;p&gt;A closure is a function that remembers and accesses variables from its outer scope even after the outer function has finished executing.&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%2Fxxj53sk91sc8usv75cpw.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%2Fxxj53sk91sc8usv75cpw.jpg" alt=" " width="720" height="1612"&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.amazonaws.com%2Fuploads%2Farticles%2Fxglbchut5ol00d4npwrz.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%2Fxglbchut5ol00d4npwrz.jpg" alt=" " width="720" height="1612"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>INTRODUCTION OF ME</title>
      <dc:creator>Praveen</dc:creator>
      <pubDate>Tue, 21 Apr 2026 08:45:49 +0000</pubDate>
      <link>https://dev.to/praveenv2426/introduction-of-me-4hj2</link>
      <guid>https://dev.to/praveenv2426/introduction-of-me-4hj2</guid>
      <description>&lt;p&gt;Myself praveen &lt;br&gt;
Thank you for giving opportunity introduce myself to you.&lt;br&gt;
Now iam pursuing full stack Java development course.I had a skills &lt;br&gt;
In Html,css and javascript and also done projects in Html,css and I know the   basic concepts of javascript .I writing  blogs in dev.to related to what I am learned everyday .and also passionate about the video editing doing freelance edits for the clients also.so i taken career as a developer and passion  as video editing . that's all thank you&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Javascript iteration method</title>
      <dc:creator>Praveen</dc:creator>
      <pubDate>Thu, 16 Apr 2026 08:06:26 +0000</pubDate>
      <link>https://dev.to/praveenv2426/javascript-iteration-method-180j</link>
      <guid>https://dev.to/praveenv2426/javascript-iteration-method-180j</guid>
      <description>&lt;p&gt;&lt;strong&gt;For each method&lt;/strong&gt;&lt;br&gt;
The forEach() method calls a function for each element in an array.&lt;br&gt;
Const marks =[24,35,100,47,55,65]&lt;br&gt;
Marks.forEach(display);&lt;br&gt;
Function display (V);{&lt;br&gt;
Console.log(V);&lt;br&gt;
}&lt;br&gt;
We can able to get value,index,array&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For.map method&lt;/strong&gt;&lt;br&gt;
map() creates a new array from calling a function for every array element.&lt;/p&gt;

&lt;p&gt;map() does not execute the function for empty elements.&lt;/p&gt;

&lt;p&gt;map() does not change the original array.&lt;br&gt;
Const marks =[100,99,98,96,75];&lt;br&gt;
Marks.map=(display)&lt;br&gt;
Function display (V)&lt;br&gt;
{&lt;br&gt;
Return v+3&lt;br&gt;
}&lt;br&gt;
&lt;strong&gt;flat map&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The flatMap() method first maps all elements of an array and then creates a new array by flattening the array.&lt;br&gt;
Const products =["car,bike","sofa,bed","shirt,pant"&lt;br&gt;
Console.log (products.map(a=&amp;gt;a.split(","));&lt;br&gt;
&lt;strong&gt;Filter&lt;/strong&gt;&lt;br&gt;
const numbers = [45, 4, 9, 16, 25];&lt;br&gt;
const over18 = numbers.filter(myFunction);&lt;/p&gt;

&lt;p&gt;function myFunction(value, index, array) {&lt;br&gt;
  return value &amp;gt; 18;&lt;br&gt;
}&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Call back function we</title>
      <dc:creator>Praveen</dc:creator>
      <pubDate>Wed, 15 Apr 2026 08:02:54 +0000</pubDate>
      <link>https://dev.to/praveenv2426/call-back-function-5398</link>
      <guid>https://dev.to/praveenv2426/call-back-function-5398</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Synchronous JavaScript?&lt;/strong&gt;&lt;br&gt;
In synchronous programming, operations are performed one after the other, in sequence. So, basically each line of code waits for the previous one to finish before proceeding to the next. This means that the program executes in a predictable, linear order, with each task being completed before the next one starts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Asynchronous JavaScript?&lt;/strong&gt;&lt;br&gt;
Asynchronous programming, on the other hand, allows multiple tasks to run independently of each other. In asynchronous code, a task can be initiated, and while waiting for it to complete, other tasks can proceed. This non-blocking nature helps improve performance and responsiveness, especially in web applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;call back function&lt;/strong&gt;.&lt;br&gt;
Call back function is an passed an argument into Anto another function&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java script is single threaded programming language&lt;/strong&gt;&lt;br&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;

</description>
    </item>
    <item>
      <title>Java script array methods</title>
      <dc:creator>Praveen</dc:creator>
      <pubDate>Thu, 09 Apr 2026 08:28:16 +0000</pubDate>
      <link>https://dev.to/praveenv2426/java-script-array-methods-2m1d</link>
      <guid>https://dev.to/praveenv2426/java-script-array-methods-2m1d</guid>
      <description>&lt;p&gt;1*&lt;em&gt;Array length&lt;/em&gt;*&lt;/p&gt;

&lt;p&gt;The length property returns the length (size) of an array:&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
const country = ["India", "pakistan", "Australia", "newzealand"];&lt;/p&gt;

&lt;p&gt;let size = country.length;&lt;/p&gt;

&lt;p&gt;2*&lt;em&gt;Javascript array tostring&lt;/em&gt;*&lt;br&gt;
JavaScript Array toString()&lt;br&gt;
The toString() method returns the elements of an array as a comma separated string.&lt;br&gt;
const fruits = ["Banana", "Orange", "Apple", "Mango"];&lt;/p&gt;

&lt;p&gt;let myList = fruits.toString();&lt;/p&gt;

&lt;p&gt;3.JavaScript Array at()&lt;br&gt;
Examples&lt;br&gt;
Get the third element of fruits using at():&lt;/p&gt;

&lt;p&gt;const fruits = ["Banana", "Orange", "Apple", "Mango"];&lt;br&gt;
let fruit = fruits.at(2);&lt;/p&gt;

&lt;p&gt;4.JavaScript Array join()&lt;/p&gt;

&lt;p&gt;The join() method also joins all array elements into a string.&lt;/p&gt;

&lt;p&gt;It behaves just like toString(), but in addition you can specify the separator:&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
const fruits = ["Banana", "Orange", "Apple", "Mango"];&lt;br&gt;
document.getElementById("demo").innerHTML = fruits.join(" * ");&lt;br&gt;
Result:&lt;/p&gt;

&lt;p&gt;Banana * Orange * Apple * Mango&lt;/p&gt;

&lt;p&gt;4.JavaScript Array push()&lt;br&gt;
The push() method adds a new element to an array (at the end):&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
const fruits = ["Banana", "Orange", "Apple", "Mango"];&lt;br&gt;
fruits.push("Kiwi");&lt;/p&gt;

&lt;p&gt;5.The push() method adds a new element to an array (at the end):&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
const fruits = ["Banana", "Orange", "Apple", "Mango"];&lt;br&gt;
fruits.push("Kiwi");&lt;/p&gt;

&lt;p&gt;6.JavaScript Array unshift()&lt;br&gt;
The unshift() method adds a new element to an array (at the beginning), and "unshifts" older elements:&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
const fruits = ["Banana", "Orange", "Apple", "Mango"];&lt;br&gt;
fruits.unshift("Lemon");&lt;br&gt;
7.JavaScript Array delete()&lt;br&gt;
Using delete() leaves undefined holes in the array.&lt;/p&gt;

&lt;p&gt;Use pop() or shift() instead.&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
const fruits = ["Banana", "Orange", "Apple", "Mango"];&lt;br&gt;
delete fruits[0];&lt;/p&gt;

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