<?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 Avinash Batule on Medium]]></title>
        <description><![CDATA[Stories by Avinash Batule on Medium]]></description>
        <link>https://medium.com/@way2frontenddeveloper?source=rss-1e6823289af5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7oT497A1Px0UERQTKXJASA.png</url>
            <title>Stories by Avinash Batule on Medium</title>
            <link>https://medium.com/@way2frontenddeveloper?source=rss-1e6823289af5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:25:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@way2frontenddeveloper/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[Logic Thinking]]></title>
            <link>https://way2frontenddeveloper.medium.com/logic-thinking-6156ee2b1c7e?source=rss-1e6823289af5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6156ee2b1c7e</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Avinash Batule]]></dc:creator>
            <pubDate>Wed, 28 Aug 2024 13:28:20 GMT</pubDate>
            <atom:updated>2024-08-28T13:28:20.230Z</atom:updated>
            <content:encoded><![CDATA[<p>reverse alternative word of string</p><pre>function reverseStr(str) {<br>    return str.split(&#39; &#39;).map((word, index) =&gt; {<br>        return index % 2 === 1 ? word.split(&#39;&#39;).reverse().join(&#39;&#39;) : word;<br>    }).join(&#39; &#39;);<br>}<br><br>const input = &#39;i am frontend developer&#39;;<br>const result = reverseStr(input);<br>console.log(result); // Output: &quot;i ma frontend repoleved&quot;</pre><h3>Explanation:</h3><ol><li><strong>split(‘ ‘)</strong>: The string is split into words based on spaces.</li><li><strong>map((word, index) =&gt; { … })</strong>: The map function is used to iterate over each word. If the word is at an odd index (index % 2 === 1), it is reversed.</li><li><strong>join(‘ ‘)</strong>: The words are then joined back into a single string, with spaces between them.</li></ol><h3>Output:</h3><p>For the input &#39;i am frontend developer&#39;, the output would be &#39;i ma frontend repoleved&#39;.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6156ee2b1c7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Concept of Memoization.]]></title>
            <link>https://way2frontenddeveloper.medium.com/concept-of-memoization-cb5f300c660f?source=rss-1e6823289af5------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb5f300c660f</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Avinash Batule]]></dc:creator>
            <pubDate>Wed, 28 Aug 2024 13:15:09 GMT</pubDate>
            <atom:updated>2024-08-28T13:15:09.565Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Answer:</strong> <em>Memoization is an optimization technique used to speed up function execution by storing the results of expensive function calls and returning the cached result when the same inputs occur again.</em></p><pre>const memoize = (fn) =&gt; {<br>  const cache = {};<br>  return (...args) =&gt; {<br>    const key = JSON.stringify(args);<br>    if (cache[key]) {<br>      return cache[key];<br>    }<br>    const result = fn(...args);<br>    cache[key] = result;<br>    return result;<br>  };<br>};</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb5f300c660f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Level up your Angular Interview Questions for 2024]]></title>
            <link>https://way2frontenddeveloper.medium.com/level-up-your-angular-interview-questions-for-2024-4164b923ee4c?source=rss-1e6823289af5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4164b923ee4c</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Avinash Batule]]></dc:creator>
            <pubDate>Sat, 24 Aug 2024 15:17:21 GMT</pubDate>
            <atom:updated>2024-08-24T15:17:21.894Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Drhc-XpTuoWSsvgCCNVgfg.png" /></figure><h3>1. What is Angular? Why was it introduced?</h3><p><a href="https://www.simplilearn.com/tutorials/angular-tutorial/what-is-angular">Angular was introduced</a> to create Single Page applications. This framework brings structure and consistency to web applications and provides excellent scalability and maintainability.</p><p>Angular is an open-source, JavaScript framework wholly written in <a href="https://www.simplilearn.com/tutorials/programming-tutorial/advanced-typescript">TypeScript.</a> It uses HTML’s syntax to express your application’s components clearly.</p><h3>2. What is TypeScript?</h3><p>TypeScript is a superset of JavaScript that offers excellent consistency. It is highly recommended, as it provides some syntactic sugar and makes the code base more comfortable to understand and maintain. Ultimately, TypeScript code compiles down to <a href="https://www.simplilearn.com/tutorials/javascript-tutorial/introduction-to-javascript">JavaScript</a> that can run efficiently in any environment.</p><h3>3. What is data binding? Which type of data binding does Angular deploy?</h3><p><a href="https://www.simplilearn.com/tutorials/angular-tutorial/angular-data-binding">Data binding</a> is a phenomenon that allows any internet user to manipulate Web page elements using a Web browser. It uses dynamic HTML and does not require complex scripting or programming. We use data binding in web pages that contain interactive components such as forms, calculators, tutorials, and games. Incremental display of a webpage makes data binding convenient when pages have an enormous amount of data.</p><p>Angular uses the two-way binding. Any changes made to the user interface are reflected in the corresponding model state. Conversely, any changes in the model state are reflected in the UI state. This allows the framework to connect the DOM to the Model data via the controller. However, this approach affects performance since every change in the DOM has to be tracked.</p><h3><strong>4.What are Single Page Applications (SPA)?</strong></h3><p>Single-page applications are web applications that load once with new features just being mere additions to the user interface. It does not load new HTML pages to display the new page’s content, instead generated dynamically. This is made possible through JavaScript’s ability to manipulate the DOM elements on the existing page itself. A SPA approach is faster, thus providing a seamless user experience.</p><h3>6. What are decorators in Angular?</h3><p>Decorators are a design pattern or functions that define how Angular features work. They are used to make prior modifications to a class, service, or filter. Angular supports four types of decorators, they are:</p><ol><li>Class Decorators</li><li>Property Decorators</li><li>Method Decorators</li><li>Parameter Decorators</li></ol><h3>7. Mention some advantages of Angular.</h3><p>Some of the common advantages of Angular are -</p><p><a href="https://www.simplilearn.com/tutorials/dot-net-tutorial/mvc-architecture"><strong>01.MVC architecture</strong></a> — Angular is a full-fledged MVC framework. It provides a firm opinion on how the application should be structured. It also offers bi-directional data flow and updates the real DOM.</p><p><strong>02.Modules:</strong> Angular consists of different design patterns like components, directives, pipes, and services, which help in the smooth creation of applications.</p><p><a href="https://www.simplilearn.com/tutorials/angular-tutorial/angular-dependency-injection"><strong>03.Dependency injection</strong></a><strong>:</strong> Components dependent on other components can be easily worked around using this feature.</p><p><strong>04.Other generic advantages </strong>include clean and maintainable code, unit testing, reusable components, data binding, and excellent responsive experience.</p><h3>8. What are the new updates with Angular10?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hXvKwfzalcMl7aV-yJoT-w.png" /></figure><ul><li>Older versions of TypeScript not supported — Previous versions of Angular supported typescript 3.6, 3.7, and even 3.8. But with Angular 10, TypeScript bumped to TypeScript 3.9.</li><li>Warnings about CommonJS imports — Logging of unknown property bindings or element names in templates is increased to the “error” level, which was previously a “warning” before.</li><li>Optional strict setting — Version 10 offers a stricter project setup when you create a new workspace with ng new command.</li></ul><p><strong>ng new — strict</strong></p><p>NGCC Feature — Addition of NGCC features with a program based entry point finder.</p><ul><li><strong>Updated URL routing</strong></li><li><strong>Deprecated APIs</strong> — Angular 10 has several deprecated APIs.</li><li><strong>Bug fixes</strong> — With this Angular 10 version, there have been a number of bug fixes, important ones being the compiler avoiding undefined expressions and the core avoiding a migration error when a nonexistent symbol is imported.</li><li><strong>New Default Browser Configuration </strong>— Browser configuration for new projects has been upgraded to outdo older and less used browsers.</li></ul><h3>9. What are Templates in Angular?</h3><p>Angular Templates are written with HTML that contains Angular-specific elements and attributes. In combination with the model and controller’s information, these templates are further rendered to provide a dynamic view to the user.</p><h3>10. What are Annotations in Angular?</h3><p>Annotations in Angular are used for creating an annotation array. They are the metadata set on the class that is used to reflect the Metadata library.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4164b923ee4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[what is angular framework]]></title>
            <link>https://way2frontenddeveloper.medium.com/what-is-angular-framework-380162035015?source=rss-1e6823289af5------2</link>
            <guid isPermaLink="false">https://medium.com/p/380162035015</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[angularjs]]></category>
            <dc:creator><![CDATA[Avinash Batule]]></dc:creator>
            <pubDate>Sat, 24 Aug 2024 14:53:05 GMT</pubDate>
            <atom:updated>2024-08-24T14:53:05.400Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*narhiVN3EX1Ipf8EicA2zQ.png" /></figure><blockquote>Angular is a popular open-source web application framework developed by Google. It is designed to make it easier to build dynamic, single-page applications (SPAs) by providing a robust set of tools and features. Angular is built using TypeScript, which is a statically typed superset of JavaScript, and offers a range of functionalities to streamline development. Here are some key features:</blockquote><ol><li><strong>Component-Based Architecture</strong>:<em> Angular applications are built using components, which are reusable building blocks that encapsulate the HTML, CSS, and logic for a part of the UI. This promotes modularity and makes it easier to manage and maintain code.</em></li><li><strong>Two-Way Data Binding</strong>: <em>This feature allows for automatic synchronization of data between the model and the view. When the model changes, the view reflects the change, and vice versa.</em></li><li><strong>Dependency Injection</strong>: <em>Angular has a built-in dependency injection system that helps manage the components’ dependencies and promotes better code organization and testability.</em></li><li><strong>Directives</strong>: <em>Angular uses directives to extend HTML’s capabilities by creating custom elements or attributes. Directives can manipulate the DOM or bind data to it.</em></li><li><strong>Routing</strong>: <em>Angular provides a powerful routing module that allows developers to create single-page applications with multiple views, enabling navigation between different components or pages.</em></li><li><strong>Forms Handling</strong>: <em>Angular includes tools for handling forms, including both template-driven and reactive forms, which simplify form creation, validation, and submission.</em></li><li><strong>RxJS Integration</strong>: <em>Angular incorporates RxJS (Reactive Extensions for JavaScript) for handling asynchronous operations and managing data streams, which is particularly useful for dealing with HTTP requests and real-time updates.</em></li><li><strong>CLI Tools</strong>: <em>The Angular Command Line Interface (CLI) helps automate development tasks like project setup, code generation, and deployment, making the development process more efficient.</em></li></ol><p>Angular is widely used for building large-scale, enterprise-level applications due to its comprehensive feature set and strong support from Google and the open-source community.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=380162035015" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Write js advance level]]></title>
            <link>https://way2frontenddeveloper.medium.com/write-js-advance-level-f07fa28d1959?source=rss-1e6823289af5------2</link>
            <guid isPermaLink="false">https://medium.com/p/f07fa28d1959</guid>
            <category><![CDATA[javascript-development]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-frameworks]]></category>
            <category><![CDATA[frontend-development]]></category>
            <dc:creator><![CDATA[Avinash Batule]]></dc:creator>
            <pubDate>Thu, 22 Aug 2024 04:09:44 GMT</pubDate>
            <atom:updated>2024-08-28T13:30:29.998Z</atom:updated>
            <content:encoded><![CDATA[<h3>Write js like advance level</h3><p>Guess the chronology of following promise</p><pre>const promise = new Promise((resolve, reject) =&gt; {<br>  console.log(1);<br>  setTimeout(() =&gt; {<br>    console.log(&quot;timerStart&quot;);<br>    resolve(&quot;success&quot;);<br>    console.log(&quot;timerEnd&quot;);<br>  }, 0);<br>  console.log(2);<br>});<br><br>promise.then((res) =&gt; {<br>  console.log(res);<br>});<br><br>console.log(4);<br></pre><p>Step-by-Step Execution:</p><p>Creating the Promise:The promise is created, and the executor function is immediately invoked.console.log(1) runs, printing 1 to the console.Setting a Timeout:setTimeout is scheduled with a delay of 0. Even though the delay is 0, the callback still goes to the callback queue, meaning it will run after the current execution stack is complete.console.log(2) runs next, printing 2 to the console.Promise Resolution:The executor function finishes, and control returns to the main code. The promise is still pending at this point.Console.log(4):console.log(4) runs, printing 4 to the console.Processing the Event Loop:The event loop processes the next task in the queue, which is the setTimeout callback.console.log(&quot;timerStart&quot;) runs, printing timerStart.The promise is resolved with &quot;success&quot;, so the then callback is scheduled to run after the current task finishes.console.log(&quot;timerEnd&quot;) runs, printing timerEnd.Promise .then() Callback:The then callback runs, printing success to the console.Final Output Order:1<br>2<br>4<br>timerStart<br>timerEnd<br>successExplanation:The promise executor runs synchronously, so logs 1 and 2 first.console.log(4) is outside the promise and runs immediately after the executor finishes.The setTimeout callback is delayed until the current execution completes, so &quot;timerStart&quot;, &quot;timerEnd&quot;, and finally &quot;success&quot; are logged in that order.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f07fa28d1959" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[interviewer favourite question react js]]></title>
            <link>https://way2frontenddeveloper.medium.com/interviewer-favourite-question-react-js-a464af0e515b?source=rss-1e6823289af5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a464af0e515b</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Avinash Batule]]></dc:creator>
            <pubDate>Sat, 17 Feb 2024 14:37:22 GMT</pubDate>
            <atom:updated>2024-02-17T14:37:22.078Z</atom:updated>
            <content:encoded><![CDATA[<p>call api</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*enT0GHl3HgA-NlUzZBCMAg.jpeg" /></figure><p>01. by fetch method ..</p><pre>import React, { useState, useEffect } from &#39;react&#39;;<br><br>function ApiExample() {<br><br> const [data, setData] = useState([]);<br><br>const fetchData = async () =&gt; {<br> try {<br> const response = await fetch(&#39;https://jsonplaceholder.typicode.com/posts&#39;);<br> const jsonData = await response.json();<br> setData(jsonData);<br><br> } catch (error) {<br> console.error(&#39;Data was not fetched:&#39;, error);<br> }<br><br> };<br><br>useEffect(() =&gt; {<br> fetchData();<br> }, []);<br><br>return (<br> &lt;div&gt;<br> &lt;h1&gt;Posts&lt;/h1&gt;<br> &lt;ul&gt;<br> {data.map(d =&gt; (<br> &lt;li key={d.id}&gt;<br> &lt;h2&gt;{d.title}&lt;/h2&gt;<br> &lt;p&gt;{d.body}&lt;/p&gt;<br> &lt;/li&gt;<br> ))}<br> &lt;/ul&gt;<br> &lt;/div&gt;<br> );<br>}<br>export default ApiExample;</pre><p>02.by axios method</p><pre>import React, { useState, useEffect } from &#39;react&#39;;<br>import axios from &#39;axios&#39;;<br><br>function FetchDataExample() {<br><br>const [user,setUser]=useState([])<br>useEffect(()=&gt;{<br>fetchDAta()<br>},[])<br>  <br>const fetchData=async()=&gt;{<br>try{<br>const response =await axios.get(&#39;https://jsonplaceholder.typicode.com/posts&#39;)se<br>setUser(response.user)<br>}<br>catch(error){<br>console.error(&#39;data was not fetched:&#39;,error)<br>}<br><br>}<br>  return (<br>    &lt;div&gt;<br>&lt;u&gt;<br>{data.map(D=&gt;(<br>&lt;li key={d.id}&gt;<br>&lt;h3&gt; {user.title}&lt;/h3&gt;<br>&lt;p&gt; {user.body}&lt;/p&gt;<br>&lt;/li&gt;<br>))}<br>&lt;/ul&gt;<br><br>&lt;/div&gt;<br>  );<br>}<br><br>export default FetchDataExample;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a464af0e515b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[how to create tringular pattern in javascript by diff diff methods]]></title>
            <link>https://way2frontenddeveloper.medium.com/how-to-create-tringular-pattern-in-javascript-by-diff-diff-methods-43d63c3a96a4?source=rss-1e6823289af5------2</link>
            <guid isPermaLink="false">https://medium.com/p/43d63c3a96a4</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[js]]></category>
            <dc:creator><![CDATA[Avinash Batule]]></dc:creator>
            <pubDate>Sat, 17 Feb 2024 07:56:30 GMT</pubDate>
            <atom:updated>2024-02-17T07:56:30.160Z</atom:updated>
            <content:encoded><![CDATA[<pre><br>function createTriangularPattern(str) {<br>  let pattern = &#39;&#39;;<br>  for (let i = 0; i &lt; str.length; i++) {<br>    // We need to use `i + 1` instead of `i` to include the current character<br>    pattern += &#39;*&#39;.repeat(i + 1); // Increment by 1 to include the current character<br>    if (i &lt; str.length - 1) {<br>      pattern += &#39;\n&#39;; // Add a new line for the next row<br>    }<br>  }<br>  return pattern;<br>}<br><br>console.log(createTriangularPattern(&quot;******************&quot;));<br>// output<br>// *<br>// **<br>// ***<br>// ****<br>// *****<br>// ******</pre><p>02.</p><pre>function createTriangularPattern(str) {<br>  return str.split(&#39;&#39;).reduce((pattern, char, index) =&gt; {<br>  <br>    if (index &lt; str.length - 1) {<br>      pattern += &#39;*&#39;.repeat(index);<br>      pattern += &#39;\n&#39;; // Use &#39;\n&#39; for a new line<br>    }<br>    return pattern;<br>  }, &#39;&#39;);<br>}<br><br>console.log(createTriangularPattern(&quot;*****&quot;));</pre><p>03.</p><pre>function createTriangularPattern(str) {<br>    let pattern = &#39;&#39;;<br>    for (let i = 0; i &lt; str.length; i++) {<br>        for (let j = 0; j &lt;= i; j++) {<br>            pattern += &#39;*&#39;;<br>        }<br>        if (i &lt; str.length - 1) {<br>            pattern += &#39;\n&#39;; // Add a new line for the next row<br>        }<br>    }<br>    return pattern;<br>}<br><br>console.log(createTriangularPattern(&quot;******************&quot;));</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43d63c3a96a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[most asked question in react interview]]></title>
            <link>https://way2frontenddeveloper.medium.com/most-asked-question-in-react-interview-425875b8afdb?source=rss-1e6823289af5------2</link>
            <guid isPermaLink="false">https://medium.com/p/425875b8afdb</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Avinash Batule]]></dc:creator>
            <pubDate>Sat, 17 Feb 2024 07:31:43 GMT</pubDate>
            <atom:updated>2024-02-17T07:31:43.796Z</atom:updated>
            <content:encoded><![CDATA[<p>take this alphabet = ‘<strong>ABCDEFGHIJKLMNOPQRSTUVWXYZ</strong>’;</p><p>Output: “A*C**F***J****O*****U*****”</p><pre>function inserAlphabets(){<br>   const alphabet = &#39;ABCDEFGHIJKLMNOPQRSTUVWXYZ&#39;;<br>  const starPosition=[1,3,4,6,7,8,10,11,12,13,15,16,17,18,19,21,22,23,24,25]<br>  let  modifiedAlphabets=&#39;&#39;;<br>  <br>  for(let i=0;i&lt;alphabet.length;i++){<br>    if(starPosition.includes(i)){<br>      modifiedAlphabets+=&#39;*&#39;;<br>    }else{<br>      modifiedAlphabets+=alphabet[i]<br>    }<br>  }<br>  return modifiedAlphabets<br>}<br>   <br>console.log(inserAlphabets())<br>// output &quot;A*C**F***J****O*****U*****&quot;</pre><h4>Q2.creat output like following pattern</h4><p>A</p><p>A*C</p><p>A*C**F</p><p>A*C**F***J</p><p>A*C**F***J****O</p><p>A*C**F***J****O*****U</p><pre>function createTriangularPattern(str) {<br>  let pattern = &#39;&#39;;<br>  for (let i = 0; i &lt; str.length; i++) {<br>    pattern += str[i];<br>    if (i &gt; 0) {<br>      pattern += &#39;*&#39;.repeat(i);<br>    }<br>    if (i &lt; str.length - 1) {<br>      pattern += &#39;\n&#39;; // Add a new line for the next row<br>    }<br>  }<br>  return pattern;<br>}<br><br>console.log(createTriangularPattern(&quot;ACFJOU&quot;));<br><br>// output <br>//   &quot;A<br>//   C*<br>//   F**<br>//   J***<br>//   O****<br>//   U*****&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=425875b8afdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[String Manipulation Algorithms:]]></title>
            <link>https://way2frontenddeveloper.medium.com/string-manipulation-algorithms-6dd0d56ef9f3?source=rss-1e6823289af5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6dd0d56ef9f3</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Avinash Batule]]></dc:creator>
            <pubDate>Tue, 06 Feb 2024 05:56:53 GMT</pubDate>
            <atom:updated>2024-02-06T05:56:53.638Z</atom:updated>
            <content:encoded><![CDATA[<ul><li>Reversing a String</li><li>Counting the Number of Words in a String</li><li>Checking Anagrams</li><li>Checking for Palindromes</li></ul><h4>Reversing a String:</h4><blockquote>Reversing a string involves <strong>changing the order of characters</strong> in a string so that the last character becomes the first, the second-to-last becomes the second, and so on.</blockquote><pre>const myName=&quot;avinash&quot;;<br><br>function reverseStr(str){<br>return str.split(&quot;&quot;).reverse().join()<br>}<br>console.log(reverseStr(myName))<br>// output hsanivia</pre><h4>counting words in the string</h4><pre>function countWords(str) {<br>    const words = str.split(&#39; &#39;);//-&gt; const words = str.split(&#39;&#39;)=&gt;output 11<br>    return words.length;<br>}<br>console.log(countWords(&quot;Hello world&quot;)); // Output: 2</pre><h4>.how to check string is anagram or not;</h4><blockquote><strong>Anagrams means :</strong>-words or phrases formed by rearranging the letters of another word or phrase.</blockquote><blockquote>To check if two strings are anagrams, you can compare their sorted versions.</blockquote><pre>function isAnagram(str1, str2) {<br>    const sortedStr1 = str1.toLowerCase().split(&#39;&#39;).sort().join(&#39;&#39;);<br>    const sortedStr2 = str2.toLowerCase().split(&#39;&#39;).sort().join(&#39;&#39;);<br>    return sortedStr1 === sortedStr2;<br>}<br><br>console.log(isAnagram(&#39;listen&#39;, &#39;listne&#39;)); // Output: true</pre><h4>palindrome string ?</h4><blockquote>a given sequence of characters reads the same forwards and backwards. Here’s a breakdown of how to implement palindrome checking in JavaScript:</blockquote><pre>function isPalindrom(str){<br>// Step 1: Remove non-alphanumeric characters and convert to lowercase<br>    const cleanStr = str.replace(/[^A-Za-z0-9]/g, &#39;&#39;).toLowerCase();<br><br>    // Step 2: Reverse the string<br>    const reversedStr = cleanStr.split(&#39;&#39;).reverse().join(&#39;&#39;);<br><br>    // Step 3: Compare the original string with its reversed version<br>    return cleanStr === reversedStr;<br>};<br>console.log(isPalindrome(&quot;A man, a plan, a canal, Panama!&quot;)); // Output: true<br>console.log(isPalindrome(&quot;racecar&quot;)); // Output: true<br>console.log(isPalindrome(&quot;hello&quot;)); // Output: false</pre><p>thank to everyone who read everyday my blogs and enhanching basci of js</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6dd0d56ef9f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[D.S.A Q]]></title>
            <link>https://way2frontenddeveloper.medium.com/d-s-a-q-873c788e0888?source=rss-1e6823289af5------2</link>
            <guid isPermaLink="false">https://medium.com/p/873c788e0888</guid>
            <category><![CDATA[js]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Avinash Batule]]></dc:creator>
            <pubDate>Mon, 05 Feb 2024 07:20:40 GMT</pubDate>
            <atom:updated>2024-02-13T10:48:45.927Z</atom:updated>
            <content:encoded><![CDATA[<h3>D.S.A Q-8</h3><blockquote><strong>Q create new array of with the name companies and make it capital laters</strong></blockquote><p><em>you can use the </em><em>map() method to iterate over the array of company objects and transform each company name to uppercase. Here&#39;s how you can do it</em>:</p><pre>// Array of company objects<br>const companies = [<br>    {<br>        name: &quot;Company A&quot;,<br>        period: {<br>            start: &quot;2020-01-01&quot;,<br>            end: &quot;2024-01-01&quot;<br>        },<br>        revenue: 1000000,<br>        type: &quot;Tech&quot;,<br>        details: {<br>            location: &quot;California&quot;,<br>            industry: &quot;Software&quot;<br>        }<br>    },<br>    {<br>        name: &quot;Company B&quot;,<br>        period: {<br>            start: &quot;1990-06-01&quot;,<br>            end: &quot;2023-12-31&quot;<br>        },<br>        revenue: 750000,<br>        type: &quot;Finance&quot;,<br>        details: {<br>            location: &quot;New York&quot;,<br>            industry: &quot;Finance&quot;<br>        }<br>    },<br>    {<br>        name: &quot;Company C&quot;,<br>        period: {<br>            start: &quot;2001-03-15&quot;,<br>            end: &quot;2025-03-15&quot;<br>        },<br>        revenue: 1200000,<br>        type: &quot;Healthcare&quot;,<br>        details: {<br>            location: &quot;Massachusetts&quot;,<br>            industry: &quot;Healthcare&quot;<br>        }<br>    }<br>];<br><br><br>}<br><br>const compName=companies.map(comp=&gt;comp.name.toUpperCase())<br><br>console.log(compName)<br>// output - [&quot;COMPANY A&quot;,&quot;COMPANY B&quot;,&quot;COMPANY C&quot;]</pre><blockquote>find the total revenue of the company</blockquote><pre>// Initialize total revenue variable<br>let totalRevenue = 0;<br><br>// Loop through the companies array<br>for (let i = 0; i &lt; companies.length; i++) {<br>    // Add the revenue of the current company to the total revenue<br>    totalRevenue += companies[i].revenue;<br>}<br><br>// Output the total revenue<br>console.log(&quot;Total revenue of the companies:&quot;, totalRevenue);</pre><p>total revenue by reduce method</p><pre>// Calculate total revenue using reduce method<br>const totalRevenue = companies.reduce((total, company) =&gt; {<br>    return total + company.revenue;<br>}, 0);<br><br>console.log(&#39;Total Revenue:&#39;, totalRevenue);</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=873c788e0888" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>