<?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 Soni on Medium]]></title>
        <description><![CDATA[Stories by Soni on Medium]]></description>
        <link>https://medium.com/@sonisuyal98?source=rss-e38c9e2814b0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7iMeHRSvhd2UbpE-.jpg</url>
            <title>Stories by Soni on Medium</title>
            <link>https://medium.com/@sonisuyal98?source=rss-e38c9e2814b0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 16:41:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sonisuyal98/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[.map(), .filter() and .reduce() in JavaScript]]></title>
            <link>https://medium.com/@sonisuyal98/map-filter-and-reduce-in-javascript-31e3c988665d?source=rss-e38c9e2814b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/31e3c988665d</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[functional-programming]]></category>
            <dc:creator><![CDATA[Soni]]></dc:creator>
            <pubDate>Sat, 12 Feb 2022 16:01:10 GMT</pubDate>
            <atom:updated>2022-02-12T16:03:12.283Z</atom:updated>
            <content:encoded><![CDATA[<h3>.map(), .filter() and .reduce() in JavaScript</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FcizvtVT5JeP4ThX" /><figcaption>map(), reduce(), filter()</figcaption></figure><blockquote>If you’re a JavaScript developer or just beginning with JavaScript, Somewhere you have heard of map(), filter() and reduce(). Sometimes people who’re new to these functions are confused like what exactly these functions do and how to use them? Let’s discuss it in this article below one by one.</blockquote><p><strong>.map()</strong></p><p><em>.map() is used to transform an array. Transform means let say you have an array which contains some numbers and you need to find the double of each number or triple of each number, So you want to transform it with some transformation logic and get a new array out it.</em></p><pre>const arr = [2, 4, 5, 6, 8]<br>//  double arr = [4, 8, 10, 12, 16]<br>//  triple arr = [8, 12, 15, 18, 24]</pre><p><em>Let try with an example:</em></p><pre>let array = [1, 2, 3, 4, 5, 6]</pre><pre>function double(x){<br>return x * 2;<br>}</pre><pre>const result = array.map(double); // take callback function</pre><pre>//   Or with arrow function</pre><pre>const result = array.map(x =&gt; x * 2);<br>console.log(result);        // will print an array with double</pre><p><strong>.filter()</strong></p><p><em>.filter() method is used to filter an array. It will filter an array based on some logic and will return you an array with filtered value. Say for example you have an array and want to find out which elements are greater than a specific number? Let’s try it out.</em></p><pre>let arr = [2, 8, 3, 4, 5, 6]</pre><pre>function greaterThan3(x){<br>return x &gt; 3;<br>}</pre><pre>const result = arr.filter(greaterThan3); // take callback function</pre><pre>//   or with arrow function</pre><pre>const result = arr.filter(x =&gt; x &gt; 3);<br>console.log(result);</pre><p><strong>.reduce()</strong></p><p><em>.reduce() method used in a place where you need to take all the element of an array and come up with a single value out of it. For example let say we have an array and we need to find sum of it or maximum of it.</em></p><pre>let arr = [1, 5, 6, 8, 9, 3]<br>// sum, maximum</pre><p><em>First will try to write code with non functional programming ways and then with reduce(), So it will be more clear.</em></p><pre>// Sum with non functional way<br>let arr = [2, 8, 3, 4, 5, 6];</pre><pre>function findSum(){<br> let sum = 0;<br>  for(let i = 0; i &lt; arr.length; i++){<br>   sum = sum + arr[i];<br>   }<br>  return sum;<br> }<br>console.log(findSum());</pre><p><em>Now it’s reduce turn. .reduce() method takes two arguments :</em></p><pre>arr.reduce(function(acc, curr){ // <strong><em>first parameter</em></strong><br>// <em>it will iterate over each element of array and this </em><strong><em>current(curr)</em></strong><em> with refer to current element of this array.</em></pre><pre>// <strong><em>Accumulator(acc)</em></strong><em> will accumulate the result for elements of the array.</em><br>},0) //<strong> <em>second parameter<br></em></strong><em> it represents the initial value for the accumulator</em></pre><p><em>Now let write the same code with reduce:</em></p><pre>let arr = [1, 2, 3, 4, 5, 6]</pre><pre>const result = arr.reduce(function(acc, curr){<br>   acc = acc + curr;<br>   return acc;<br>});<br>console.log(result);</pre><p><strong><em>Try it!</em></strong></p><p><em>This is the simplest way of using .map(), .filter() and .reduce(). If you replace for loop with these method’s where it fits. It will help you a lot to make you code more cleaner and easy to read.</em></p><p><em>Happy coding!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31e3c988665d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pros and cons for being a frontend developer]]></title>
            <link>https://medium.com/@sonisuyal98/pros-and-cons-for-being-a-frontend-developer-2bbee20cce06?source=rss-e38c9e2814b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bbee20cce06</guid>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Soni]]></dc:creator>
            <pubDate>Sun, 17 Oct 2021 17:16:29 GMT</pubDate>
            <atom:updated>2022-02-13T08:08:18.431Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Fo8WM_Tkq0bC_bPN" /><figcaption>Pros and cons</figcaption></figure><blockquote>In today’s world IT industry is growing very rapidly, Web development is major part of it. There are many developers that are working on this field and getting a decent pay. Web development is majorly divided into two parts.</blockquote><p><em>1: Frontend development</em></p><p><em>2: Backend development</em></p><p><em>In this article, We will discuss what are some common pros and cons for being a frontend developer.</em></p><p><strong><em>Pros</em></strong></p><p><strong><em>Creative job profile</em></strong></p><p><em>As a frontend developer one will get lots of good opportunities to work on many good project and provide a great user experience to their end users. So You will never feel bored :).</em></p><p><strong><em>Great pay</em></strong></p><p><em>According to pay scale, An entry level (having experience of less than 1 year) can get minimum of 4 - 5 LPA. Also it can be vary company to company and according to level of your skills. Simple mathematics:</em></p><p><em>Great skills is proportional to great pay.</em></p><p><strong><em>Learning and Growing</em></strong></p><p><em>Technologies changes very fast, So You have something new to learn always, It’s enhance your skills set and makes you grow faster.</em></p><p><strong><em>Variety of Work</em></strong></p><p><em>As a frontend developer you have lots of option to make choices, For example which frameworks suits you best, what kind of projects you want to work on and what is the level of UX you want to provide to your users etc.</em></p><p><strong><em>Cons</em></strong></p><p><strong><em>Limitation</em></strong></p><p><em>Being a frontend developer you will only have knowledge about frontend components and designs. This will limit a frontend developer to only that particular thing.</em></p><p><strong><em>Demand for the role</em></strong></p><p><em>As a company one will prefer that asset which is more flexible to work in any environment, means an asset which can work on frontend and backend with the same cost.</em></p><p><strong><em>Less Opportunities</em></strong></p><p><em>As a developer if your knowledgebase is vital and also have more knowledge about technologies related to other domains than, There will be huge opportunities for you otherwise you will restrict to the frontend only.</em></p><p><strong><em>Time taking thing</em></strong></p><p><em>Frontend developer needs to create design for good UX. This activity sometimes takes a lot of time and thinking, Because of that your work life balance can get affected.</em></p><p><em>At the end every domain or field has some positives and negatives. It is totally depends upon the person and his/her interest toward the technology. Sometimes it is good to be ok in other things and master in one field but one should never stop the learning :).</em></p><p><em>Happy Coding!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bbee20cce06" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>