<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rohitchourey on Medium]]></title>
        <description><![CDATA[Stories by Rohitchourey on Medium]]></description>
        <link>https://medium.com/@rohit1995chourey?source=rss-33d298037e66------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Wn9-IGll5i1j71XdFgwNaw.png</url>
            <title>Stories by Rohitchourey on Medium</title>
            <link>https://medium.com/@rohit1995chourey?source=rss-33d298037e66------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 17:44:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rohit1995chourey/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[E-commerce Redux]]></title>
            <link>https://medium.com/@rohit1995chourey/e-commerce-redux-3fa46a919a36?source=rss-33d298037e66------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fa46a919a36</guid>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[redux-thunk]]></category>
            <dc:creator><![CDATA[Rohitchourey]]></dc:creator>
            <pubDate>Wed, 17 Aug 2022 18:43:23 GMT</pubDate>
            <atom:updated>2022-08-17T18:55:58.610Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://ecommerce-redux-1.netlify.app/">React App</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IESvFDZXpDQ50E8KpePwfw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ITscgooEwl5NTZz4i6zsw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fa46a919a36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Final-Mern-Project]]></title>
            <link>https://medium.com/@rohit1995chourey/final-mern-project-269b11d4b51a?source=rss-33d298037e66------2</link>
            <guid isPermaLink="false">https://medium.com/p/269b11d4b51a</guid>
            <category><![CDATA[mern-stack]]></category>
            <category><![CDATA[mern-stack-developer]]></category>
            <dc:creator><![CDATA[Rohitchourey]]></dc:creator>
            <pubDate>Wed, 17 Aug 2022 18:34:41 GMT</pubDate>
            <atom:updated>2022-08-17T18:34:41.502Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wxCWeMnITB0J45dTycjUwA.png" /></figure><p># FinalMernProject</p><p>## DeployLink:- <a href="https://final-mern-app.netlify.app/">https://final-mern-app.netlify.app/</a></p><p><a href="https://finalmernproject.herokuapp.com/">JSON Server</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-8nFmVO-wScfQDDo6seO-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yZk1GgD7efAE9h90Vf9SYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JIIafZCOzMBQdYkz0AVVDQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rlfhwUGxfUMYhdz5-NQtAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MKdmakTpuY_DULyVvDRGNw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=269b11d4b51a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Input Filter]]></title>
            <link>https://medium.com/@rohit1995chourey/input-filter-3b64733a244a?source=rss-33d298037e66------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b64733a244a</guid>
            <dc:creator><![CDATA[Rohitchourey]]></dc:creator>
            <pubDate>Mon, 15 Aug 2022 19:32:46 GMT</pubDate>
            <atom:updated>2022-08-15T19:32:46.628Z</atom:updated>
            <content:encoded><![CDATA[<p>import React, { useState } from “react”;</p><p>export const TodoAppFunction = () =&gt; {</p><p>const [inputdata, setinputdata] = useState(“”);</p><p>const [item, setItem] = useState([]);</p><p>const handleChange = (e) =&gt; {</p><p>setinputdata(e.target.value);</p><p>};</p><p>const handleAdd = (e) =&gt; {</p><p>if (!inputdata) {</p><p>return alert(“First Filled data”);</p><p>}</p><p>for (var i = 0; i &lt; item.length; i++) {</p><p>if (item[i] === inputdata) {</p><p>return alert(“Item Already Exist”);</p><p>}</p><p>}</p><p>setinputdata(“”);</p><p>setItem([inputdata, …item]);</p><p>};</p><p>console.log(“Item”, item);</p><p>return (</p><p>&lt;&gt;</p><p>&lt;div&gt;</p><p>&lt;input value={inputdata} onChange={handleChange}&gt;&lt;/input&gt;</p><p>&lt;button onClick={handleAdd}&gt;Add Item Todo&lt;/button&gt;</p><p>&lt;/div&gt;</p><p>&lt;div id=”list”&gt;</p><p>&lt;h2&gt;ListItem&lt;/h2&gt;</p><p>{item.map((e, index) =&gt; {</p><p>return (</p><p>&lt;&gt;</p><p>&lt;div key={e.id}&gt;</p><p>&lt;h4&gt;{e}&lt;/h4&gt;</p><p>&lt;button&gt;Delete Item&lt;/button&gt;</p><p>&lt;/div&gt;</p><p>&lt;/&gt;</p><p>);</p><p>})}</p><p>&lt;/div&gt;</p><p>&lt;/&gt;</p><p>);</p><p>};</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b64733a244a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Heroku (Use and handle error)]]></title>
            <link>https://medium.com/@rohit1995chourey/heroku-use-and-handle-error-6068134f7ddd?source=rss-33d298037e66------2</link>
            <guid isPermaLink="false">https://medium.com/p/6068134f7ddd</guid>
            <dc:creator><![CDATA[Rohitchourey]]></dc:creator>
            <pubDate>Tue, 02 Aug 2022 11:21:44 GMT</pubDate>
            <atom:updated>2022-08-16T17:29:52.871Z</atom:updated>
            <content:encoded><![CDATA[<p>step 1:- heroku login</p><p>step2: - heroku create [app-name]</p><p>step3: heroku git:remote -a [appname]</p><p>step3:- git add [all files] or git add .</p><p>step4:- git commit -m “ready to push”</p><p>step5:- git push -u origin main or origin master</p><p>step6:- git push heroku main or git push heroku master (check which origin you passs)</p><p>result take API:- <a href="https://finalmernproject.herokuapp.com/">JSON Server (finalmernproject.herokuapp.com)</a></p><p>&lt;Handle Error and Basix Information&gt;</p><h3><a href="https://devcenter.heroku.com/articles/git#rename-a-remote">Rename a Remote</a></h3><p>By default, the Heroku CLI names all of the Heroku remotes it creates for your app heroku. You can rename your remotes with the git remote rename command. For example, rename heroku to heroku-staging:</p><pre>$ git remote rename heroku heroku-staging</pre><p>Renaming your Heroku remote can be handy if you have multiple Heroku apps that use the same codebase. In this case, each Heroku app has its own remote in your local repository.</p><p>The Dev Center documentation assumes your app has a single Heroku remote that is named heroku.</p><p>Error 1: fatal error/path error current repository</p><p>git remote add origin [ssh git] //find in code in section in your git repository</p><h3>Issue</h3><p>A GIT repository uses the master branch and needs to be switched to main.</p><h3>Resolution</h3><p>To switch the default branch used to deploy apps from master to main, first create a new branch locally:</p><pre>git checkout -b main</pre><p>Next, delete the old default branch locally:</p><pre>git branch -D master</pre><p>From there, the local environment only knows about the main branch</p><p>example : (1) git remote add origin <a href="/service/mailto:git@github.com">git@github.com</a>:rohitchourey0809/FinalMernProject.git</p><p><strong>JSON-SERVER DEPLOYMENT HEROKU</strong></p><p>const jsonServer = require(“json-server”);</p><p>const connect = require(‘./Config/db’);</p><p>const server = jsonServer.create();</p><p>const router = jsonServer.router(“db.json”);</p><p>const middlewares = jsonServer.defaults();</p><p>server.use(middlewares);</p><p>server.use(router);</p><p>const port = process.env.PORT || 8000;</p><p>server.listen(port, async () =&gt; {</p><p>await connect();</p><p>console.log(`JSON Server is running on port ${port}`);</p><p>});</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6068134f7ddd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ch]]></title>
            <link>https://medium.com/@rohit1995chourey/ch-ae8712ea9214?source=rss-33d298037e66------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae8712ea9214</guid>
            <dc:creator><![CDATA[Rohitchourey]]></dc:creator>
            <pubDate>Sat, 23 Jul 2022 04:02:51 GMT</pubDate>
            <atom:updated>2022-07-23T04:05:26.763Z</atom:updated>
            <content:encoded><![CDATA[<h3>Check</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zbhSkOmOiokfiBaQr3uSzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fLgn5S3aj3rHyDxsALTv9w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae8712ea9214" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Life cycle]]></title>
            <link>https://medium.com/@rohit1995chourey/react-life-cycle-b74d7ccba85?source=rss-33d298037e66------2</link>
            <guid isPermaLink="false">https://medium.com/p/b74d7ccba85</guid>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Rohitchourey]]></dc:creator>
            <pubDate>Thu, 21 Jul 2022 05:13:20 GMT</pubDate>
            <atom:updated>2022-07-21T05:13:20.748Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PofM0MwFQ2GYwIbWLHRyLA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b74d7ccba85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Delete , Add, Update(React)]]></title>
            <link>https://medium.com/@rohit1995chourey/delete-add-update-react-b2c600db6405?source=rss-33d298037e66------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2c600db6405</guid>
            <dc:creator><![CDATA[Rohitchourey]]></dc:creator>
            <pubDate>Tue, 05 Jul 2022 07:44:44 GMT</pubDate>
            <atom:updated>2022-07-05T07:44:44.989Z</atom:updated>
            <content:encoded><![CDATA[<h3>Delete , Add, Update(React)</h3><pre>import React from &quot;react&quot;;<br><br>const arr = [<br>  { id: 1, name: &quot;apple&quot; },<br>  { id: 2, name: &quot;orange&quot; },<br>  { id: 3, name: &quot;grape&quot; }<br>];<br><br>export default function App() {<br>  const [items, setItems] = React.useState(arr);<br><br>  const deleteItem = (index) =&gt; () =&gt;<br>    setItems((items) =&gt; items.filter((_, i) =&gt; i !== index));<br><br>  return (<br>    &lt;&gt;<br>      {items.map((it, index) =&gt; {<br>        return (<br>          &lt;div key={it.id}&gt;<br>            {it.name} &lt;button onClick={deleteItem(index)}&gt;delete&lt;/button&gt;<br>          &lt;/div&gt;<br>        );<br>      })}<br>    &lt;/&gt;<br>  );<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2c600db6405" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Backend Revision I/InterView QuesTion]]></title>
            <link>https://medium.com/@rohit1995chourey/backend-revision-i-interview-question-31ce6071e86?source=rss-33d298037e66------2</link>
            <guid isPermaLink="false">https://medium.com/p/31ce6071e86</guid>
            <dc:creator><![CDATA[Rohitchourey]]></dc:creator>
            <pubDate>Sun, 03 Jul 2022 05:06:44 GMT</pubDate>
            <atom:updated>2022-07-03T05:06:44.159Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>1)Explain in brief what node js is?</strong></h3><p>Node.js is an open-source server environment</p><ul><li>Node.js is free</li><li>Node.js runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)</li><li>Node.js uses JavaScript on the server</li></ul><h3>A)What Can Node.js Do?</h3><ul><li>Node.js can generate the dynamic page content</li><li>Node.js can create, open, read, write, delete, and close files on the server</li><li>Node.js can collect form data</li><li>Node.js can add, delete, and modify data in your database</li></ul><h3>B)What is a Node.js File?</h3><ul><li>Node.js files contain tasks that will be executed on certain events</li><li>A typical event is someone trying to access a port on the server</li><li>Node.js files must be initiated on the server before having any effect</li><li>Node.js files have the extension “.js”</li></ul><h3><strong>2)How is node js non-blocking?</strong></h3><h4>Node.js is based on an event-driven non-blocking I/O model.</h4><p><strong>Blocking: </strong>It refers to blocking further operations until the current operation finishes. Blocking methods are executed synchronously. Synchronously means that the program is executed line by line. The program waits until the called function or the operation returns.</p><p><strong>Non-Blocking: </strong>It refers to the program that does not block the execution of further operations. Non-Blocking methods are executed asynchronously. Asynchronously means that the program may not necessarily execute line by line. The program calls the function and moves to the next operation and does not wait for it to return.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*sXFSG08xB9b7n4wukIsgxA.png" /></figure><p><a href="https://www.geeksforgeeks.org/blocking-and-non-blocking-in-node-js/">Blocking and Non-Blocking in Node.js — GeeksforGeeks</a></p><h3><strong>3)What is EventLoop?</strong></h3><p>Ans</p><p>The <strong>event loop</strong> allows Node.js to perform non-blocking I/O operations even though JavaScript is single-threaded. It is done by assigning operations to the operating system whenever and wherever possible.</p><p><strong>Features of Event Loop:</strong></p><ul><li>Event loop An event endless loop, which waits for tasks, executes them, and then s, sleeps until it receives more tasks.</li><li>The event loop executes tasks from the event queue only when the call stack is empty i.e. there is no ongoing task.</li><li>The event loop allows us to use callbacks and promises.</li><li>The event loop executes the tasks starting from the oldest first.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*_F9J8PsHc5N_31vP8BZgYA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31ce6071e86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JS-Interview-Question]]></title>
            <link>https://medium.com/@rohit1995chourey/js-interview-question-apply-bind-call-a0258a2cec55?source=rss-33d298037e66------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0258a2cec55</guid>
            <category><![CDATA[java-interview-questions]]></category>
            <dc:creator><![CDATA[Rohitchourey]]></dc:creator>
            <pubDate>Fri, 24 Jun 2022 05:03:33 GMT</pubDate>
            <atom:updated>2022-06-24T05:39:17.282Z</atom:updated>
            <content:encoded><![CDATA[<h3>###(apply,bind,call)###</h3><ol><li><strong>Give an example of where the call, apply, and bind is. required?</strong></li></ol><p><strong>Ans:-</strong></p><p>“The call() method calls a function with a given this value and arguments provided individually.”</p><blockquote>The call() method allows a function belonging to one object to be assigned and called for a different object. We can call this “<em>Function borrowing”</em>(without rewriting the function) because we call the function with a different object. Let’s take an example</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TcCfbdmOQjtU4y9PEafspg.png" /></figure><p>getIntoducation.call(person, “Mumbai”, “MAHARASTRA”);</p><p><strong>//getIntroduction.call((Differnt object person),(Function Borrowing(argument1,argument2))</strong></p><h3><strong>2) apply()</strong></h3><p>The apply() method calls a function with a given this value, and arguments provided as an array (or an array-like object). While the syntax of this function is almost identical to that of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call">call()</a>, the fundamental difference is that call() accepts an <strong>argument list</strong>, while apply() accepts a <strong>single array of arguments</strong>.</p><p>In the call method, we have passed the argument in a comma-separated form. But in the apply method, we pass it as an array list.</p><p>The difference between call() and apply() is as follows</p><ol><li>call() set this and execute the function immediately.</li><li>Incall() method we can pass the value in the comma-separated form.</li></ol><h4>In the apply() method, we can pass parameters as an array list.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CFiOaBxHpNo3aK21IH_BLw.png" /></figure><h3><strong>Invokingfunction.apply((passing object{key-value},((passing argument in the array form) [”arg1”,”arg2”])</strong></h3><h3>3. bind()</h3><p>The bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.</p><blockquote><strong><em>An easy way to remember the bind method is that it returns a new function altogether</em></strong><em>. It does not call the process as in call() and apply().</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wzQSrt8JQlRChlqH3k5miA.png" /></figure><h3><strong>2 ) what is the difference between readFile and readFileSync?</strong></h3><p><strong>Ans:- </strong><a href="https://www.geeksforgeeks.org/node-js-fs-readfilesync-method/">Node.js fs.readFileSync() Method — GeeksforGeeks</a></p><h4>Node.js fs.readFileSync() Method</h4><p>The <strong>fs.readFileSync() method</strong> is an inbuilt application programming interface of the fs module which is used to read the file and return its content.</p><p>In the <strong>fs.readFile() method,</strong> we can read a file in a non-blocking asynchronous way, but in the <strong>fs.readFileSync()</strong> method, we can read files in a synchronous way, i.e. we are telling node.js to block other parallel process and do the current file reading process. That is,</p><p><strong>when the fs.readFileSync() method is called the original node program stops executing, and the node waits for the fs.readFileSync() function to get executed, after getting the result of the method the remaining node program is executed.</strong></p><pre>fs.readFileSync( path, options )</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0258a2cec55" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LinkedList]]></title>
            <link>https://medium.com/@rohit1995chourey/linkedlist-d41c4e364bab?source=rss-33d298037e66------2</link>
            <guid isPermaLink="false">https://medium.com/p/d41c4e364bab</guid>
            <category><![CDATA[singly-linked-list]]></category>
            <dc:creator><![CDATA[Rohitchourey]]></dc:creator>
            <pubDate>Mon, 13 Jun 2022 04:17:43 GMT</pubDate>
            <atom:updated>2022-06-13T04:17:43.941Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Q1)Find the Middle node</strong></p><p>Description</p><p>Given a non-empty, singly linked list with the head node head, return a middle node of the linked list.</p><p>If there are two middle nodes, return the second middle node.</p><p><strong>Complete the function </strong>below, no need to take any input.</p><p>Input</p><p>This is a function complete problem.</p><p>Refer to sample input for understanding</p><p>The first line contains the number of nodes The next</p><p>Next t licontainains the node of the linked list</p><p>t &lt;= 1000</p><p>list[i] &lt;= 1000</p><p>Output</p><p>Complete the function</p><p>Sample Input 1</p><pre>3<br>1<br>2<br>3</pre><p>Sample Output 1</p><pre>2</pre><p>Solution:-</p><p>const LinkedListNode = class {<br> constructor(nodeData) {<br> this.data = nodeData;<br> this.next = null;<br> }<br>};</p><p>var middleNode = function(head) {<br> var len = 0;<br> var curr = head;<br> while(curr!==null)<br> {<br> len++; //Dry Run — &gt; len = 1 →[2][next],[3][null] ==&gt; len = 2 → [3] //////////////////////[null]==&gt; len =3 →[null] — -&gt;&gt;break;<br> curr = curr.next;<br> }<br> curr = head;<br> var mid = Math.floor(len/2)<br> console.log(“Mid:::”,mid)<br> for(var i = 0; i&lt;mid; i++){<br> curr = curr.next // i=0 ,i&lt;1 → [2][next][3][null]</p><p>////////////////i=1,i!&lt;1 →[3][null]break;<br> console.log(curr, “:::CURR”)<br> }<br> return curr.data ///////[2]<br>};</p><p><strong>Q2) ROTATED LINKED LIST</strong></p><p>Rotate Linked List</p><p>Description</p><p>Given a linked list, rotate the list to the right by k places, herisson-negative.</p><p>Complete the function, and return the head of the updated list</p><p>Input</p><p>This is a function complete problem.</p><p>Refer to sample input for understanding</p><p>The first line contains the number of nodes The next</p><p>Next n licontainains the nodes of the linked lThe next</p><p>Next line contains k</p><p>n &lt;= 1000</p><p>list[i] &lt;= 1000</p><p>Output</p><p>Complete the function</p><p>Sample Input 1</p><pre>3<br>1<br>2<br>3<br>2</pre><p>Sample Output 1</p><pre>2 3 1</pre><p>SOLUTION:-</p><p>const LinkedListNode = class {<br> constructor(nodeData) {<br> this.data = nodeData;<br> this.next = null;<br> }<br>};</p><p>var rotateRight = function(head, k) {<br> //edge condition<br> if(head === null || k === 0) //[null][null]<br> {<br> return head ;<br> }<br> let i = 1;<br> let tail = head ;<br> //find the length of linkedlist<br> while(tail.next !== null)<br> {<br> i++ ; //i=3;<br> console.log(i)<br> tail = tail.next; // i=2 [2][3][null]<br> //i=3 [3][null]<br> //i=4 [null] →break;<br> console.log(“tail:-”,tail)<br> }<br> <br> //go till that node<br> tail.next = head;<br> console.log(“hEAD:::-”,head)<br> k = k % i;<br> console.log(“k”,k)<br> k = i — k;<br> console.log(“ki”,k)<br> while(k — )<br> {<br> tail = tail.next;<br> console.log(“taillast:-”,tail)<br> }<br> <br> //make the node head and break connection<br> head = tail.next;<br> console.log(“headlast:-”,head)<br> tail.next = null;<br> console.log(“taillastkhatam:-”,tail)<br> return head;<br>};</p><h3>Q3 } Add 1 to LinkedList</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z7h2X1282Cuh_sSqEFcx6g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d41c4e364bab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>