---
title: "Murali Chowhan (@Chowhan) | Hashnode"
description: "Senior Software Developer. Read the latest articles by Murali Chowhan on Hashnode."
url: "https://hashnode.com/@Chowhan"
---

@Chowhan

# Murali Chowhan

@Chowhan · Hyderabad · Joined October 2022

Senior Software Developer

### [Write a javascript program to extract the common elements and sort them in an ascending order.](https://reactonme.hashnode.dev/write-a-javascript-program-to-extract-the-common-elements-and-sort-them-in-an-ascending-order?utm_source=hashnode&utm_medium=feed)

let arr = \[1,2,2,4,5,6,6,7,7\] let res = arr.filter((item, index)=>arr.indexOf(item) !== index).sort((a,b)=>a-b) console.log(res)

1 min read · [reactonme.hashnode.dev](https://reactonme.hashnode.dev/write-a-javascript-program-to-extract-the-common-elements-and-sort-them-in-an-ascending-order?utm_source=hashnode&utm_medium=feed)

[Apr 3, 2025](https://hashnode.com/posts/write-a-javascript-program-to-extract-the-common-elements-and-sort-them-in-an-ascending-order/67ee6c53b3a76c3d57f70cf5)

### [Timer component decreases time by every one second.](https://reactonme.hashnode.dev/timer-component-decreases-time-by-every-one-second?utm_source=hashnode&utm_medium=feed)

import { useEffect, useState } from "react"; import "./styles.css"; export default function App() { const \[seconds, setSeconds\] = useState(60); // Initial value is set to 60 seconds useEffect(() => { const timerId = setInterval(() => { ...

1 min read · [reactonme.hashnode.dev](https://reactonme.hashnode.dev/timer-component-decreases-time-by-every-one-second?utm_source=hashnode&utm_medium=feed)

[Dec 5, 2023](https://hashnode.com/posts/timer-component-decreases-time-by-every-one-second/656e9eab9c1ecec12f811451)

### [Write a javascript program for reversing each word in a given sentence.?](https://reactonme.hashnode.dev/write-a-javascript-program-for-reversing-each-word-in-a-given-sentence?utm_source=hashnode&utm_medium=feed)

function reverseEachWord(sentence) { const words = sentence.split(' '); // Split the sentence into words const reversedWords = words.map(word => word.split('').reverse().join('')); // Reverse each word const reversedSentence = reversedW...

1 min read · [reactonme.hashnode.dev](https://reactonme.hashnode.dev/write-a-javascript-program-for-reversing-each-word-in-a-given-sentence?utm_source=hashnode&utm_medium=feed)

[Nov 26, 2023](https://hashnode.com/posts/write-a-javascript-program-for-reversing-each-word-in-a-given-sentence/6563755ba35b347900931c4e)

### [How to use useRef hooks in react with input box.?](https://reactonme.hashnode.dev/how-to-use-useref-hooks-in-react-with-input-box?utm_source=hashnode&utm_medium=feed)

import { useRef } from "react"; import "./styles.css"; export default function App() { const inputRef = useRef();const handleFunction = () => { inputRef.current.focus() }return ( <div className="App"> <input ref={inputRef} type="text" /> <button onCl...

1 min read · [reactonme.hashnode.dev](https://reactonme.hashnode.dev/how-to-use-useref-hooks-in-react-with-input-box?utm_source=hashnode&utm_medium=feed)

[Nov 18, 2023](https://hashnode.com/posts/how-to-use-useref-hooks-in-react-with-input-box/6558e9a635a2f3133e3649c2)

### [Write a javascript code to flatten the given array without using flattened function.](https://reactonme.hashnode.dev/write-a-javascript-code-to-flatten-the-given-array-without-using-flattened-function?utm_source=hashnode&utm_medium=feed)

function flattenArray(arr){ let flattened = \[\]; function flatten(ArrElem){ for(let i=0;i<ArrElem.length; i++){ if(Array.isArray(ArrElem\[i\])){ flatten(ArrElem\[i\]) } else{ flattened.push(ArrElem\[i\]) } } } flatten(arr) return flattened } let arr = \[1, 2...

1 min read · [reactonme.hashnode.dev](https://reactonme.hashnode.dev/write-a-javascript-code-to-flatten-the-given-array-without-using-flattened-function?utm_source=hashnode&utm_medium=feed)

[Nov 5, 2023](https://hashnode.com/posts/write-a-javascript-code-to-flatten-the-given-array-without-using-flattened-function/654731e7268d123e05aad0e7)
