<?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: Gowri Shankar S</title>
    <description>The latest articles on DEV Community by Gowri Shankar S (@gowrishankar_saravanamuthu).</description>
    <link>https://dev.to/gowrishankar_saravanamuthu</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%2F2840555%2Fd965fabc-1b2a-49e0-94d9-28e4e4a27acf.jpeg</url>
      <title>DEV Community: Gowri Shankar S</title>
      <link>https://dev.to/gowrishankar_saravanamuthu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gowrishankar_saravanamuthu"/>
    <language>en</language>
    <item>
      <title>Understanding Method Chaining in Javascript 🚀</title>
      <dc:creator>Gowri Shankar S</dc:creator>
      <pubDate>Wed, 19 Mar 2025 16:54:38 +0000</pubDate>
      <link>https://dev.to/gowrishankar_saravanamuthu/understanding-method-chaining-in-javascript-21jc</link>
      <guid>https://dev.to/gowrishankar_saravanamuthu/understanding-method-chaining-in-javascript-21jc</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/gowrishankar_saravanamuthu" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F2840555%2Fd965fabc-1b2a-49e0-94d9-28e4e4a27acf.jpeg" alt="gowrishankar_saravanamuthu"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/gowrishankar_saravanamuthu/understanding-method-chaining-in-javascript-a-practical-example-with-a-calculator-jej" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Understanding Method Chaining in JavaScript: A Practical Example with a Calculator&lt;/h2&gt;
      &lt;h3&gt;Gowri Shankar S ・ Mar 19&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#faang&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#interview&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Understanding Method Chaining in JavaScript: A Practical Example with a Calculator</title>
      <dc:creator>Gowri Shankar S</dc:creator>
      <pubDate>Wed, 19 Mar 2025 02:57:55 +0000</pubDate>
      <link>https://dev.to/gowrishankar_saravanamuthu/understanding-method-chaining-in-javascript-a-practical-example-with-a-calculator-jej</link>
      <guid>https://dev.to/gowrishankar_saravanamuthu/understanding-method-chaining-in-javascript-a-practical-example-with-a-calculator-jej</guid>
      <description>&lt;p&gt;&lt;strong&gt;Method chaining&lt;/strong&gt; in JavaScript is when you call multiple methods on the same object in a single line of code. Each method returns the object itself, so you can "chain" the next method right after it. It makes your code cleaner and more readable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Invoking the below chainable calc function should output the result 20
calculator().add(7).subtract(5).multiply(20).divide(2).getResult();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of writing multiple lines to perform operations, method chaining lets you stack them up in one smooth sequence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a Chainable Calculator in JavaScript
&lt;/h2&gt;

&lt;p&gt;Let’s see method chaining in action by building a simple chainable calculator in JavaScript. This calculator will allow us to chain mathematical operations like addition, subtraction, multiplication, and division together in a clean and readable way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Approach 1: Using a Class&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We'll create a Calculator class with basic arithmetic operations that return the instance (this), enabling chaining.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Calculator {
  constructor() {
    this.result = 0;
  }

  add(value) {
    this.result += value;
    return this;
  }

  subtract(value) {
    this.result -= value;
    return this;
  }

  multiply(value) {
    this.result *= value;
    return this;
  }

  divide(value) {
    if (value === 0) {
      return this;
    }
    this.result /= value;
    return this;
  }

  getResult() {
    return this.result;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Testing the Calculator&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const calc = new Calculator();
const result = calc.add(5).subtract(2).multiply(3).divide(4).getResult();
console.log(result); // Output: 2.25

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Approach 2: Using Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this approach, we create functions for each operation that update an object and return it, so you can chain the operations together. The object's state is kept inside the function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function calculator() {
  let result = 0;  // Start with 0

  return {
    add(value) {
      result += value;
      return this;
    },
    subtract(value) {
      result -= value;
      return this;
    },
    multiply(value) {
      result *= value;
      return this;
    },
    divide(value) {
      if (value === 0) {
        return this;
      }
      result /= value;
      return this;
    },
    getResult() {
      return result;
    }
  };
}

// Usage
const result = calculator().add(10).subtract(5).multiply(20).divide(2).getResult();
console.log(result);  // Output: 50

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Practical Use Cases for Method Chaining&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Here are some everyday examples where method chaining can be super helpful.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Making API Calls (e.g., with Axios)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Method chaining makes working with API requests straightforward. Instead of handling the response, error, and final steps separately, you can chain them together like one continuous operation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;axios.get('/user')
  .then(response =&amp;gt; {
    console.log(response.data);
  })
  .catch(error =&amp;gt; {
    console.error(error);
  })
  .finally(() =&amp;gt; {
    console.log('Request completed');
  });

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each part of the process is chained, so you don’t need to clutter your code with multiple callbacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Querying a MongoDB Database&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With MongoDB, you can chain queries together to filter, sort, and limit your results. This approach lets you build your queries gradually, step by step, making the process smooth and easy to follow.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  const result = await users.find()
    .filter({ age: { $gt: 18 } })  // Filter users where age &amp;gt; 18
    .sort({ name: 1 })  // Sort by name in ascending order
    .limit(10)  // Limit results to 10
    .toArray();  // Convert the result to an array
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You add one thing at a time, but it all happens in one smooth flow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. DOM Manipulation (Like jQuery)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you're working with the DOM, you can chain multiple actions together to manipulate an element in one go. It’s like telling the browser, "Do this, then that."&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$('#element')
  .css('color', 'red')
  .fadeIn(500)
  .slideUp(300)
  .text('Hello, World!');

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of writing separate lines for each action, you just chain them together, making your code more concise and readable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this post, we’ve explored the concept of &lt;code&gt;method chaining&lt;/code&gt; in JavaScript and built a &lt;code&gt;chainable calculator&lt;/code&gt; to demonstrate it. By using method chaining, we’ve been able to perform multiple mathematical operations in a clean and readable manner, making the code more intuitive.&lt;/p&gt;

&lt;p&gt;Method chaining is a powerful feature commonly used in JavaScript libraries and frameworks. It not only reduces the complexity of the code but also enhances the readability, making it easier to understand and maintain.&lt;/p&gt;

&lt;p&gt;If you found this post helpful, feel free to like 👍, share 🔄, and connect with me on &lt;a href="https://www.linkedin.com/in/gowri-shankar-s-software-engineer/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; 👥!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>javascript</category>
      <category>faang</category>
      <category>interview</category>
    </item>
    <item>
      <title>How to Effectively Approach LinkedIn for Referrals and Job Opportunities</title>
      <dc:creator>Gowri Shankar S</dc:creator>
      <pubDate>Mon, 10 Feb 2025 07:45:52 +0000</pubDate>
      <link>https://dev.to/gowrishankar_saravanamuthu/how-to-effectively-approach-linkedin-for-referrals-and-job-opportunities-4n6e</link>
      <guid>https://dev.to/gowrishankar_saravanamuthu/how-to-effectively-approach-linkedin-for-referrals-and-job-opportunities-4n6e</guid>
      <description>&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%2Fj68sbc37oqe0mcuufh7i.png" 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%2Fj68sbc37oqe0mcuufh7i.png" alt="Image description" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LinkedIn is one of the best platforms for finding job opportunities and securing referrals. However, many people struggle with how to approach professionals without sounding desperate or spammy. In this article, I'll share a structured approach to increase your chances of getting referrals and landing your dream job, whether you are an experienced professional or a fresher just starting out.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. Optimize Your LinkedIn Profile&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before reaching out to anyone, make sure your profile stands out. Here’s what you need to focus on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Headline&lt;/strong&gt;: Clearly mention your role and expertise (e.g., Aspiring Software Developer | Passionate About Code Quality &amp;amp; Performance Optimization).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;About Section&lt;/strong&gt;: Write a compelling summary that highlights your experience, skills, and achievements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experience &amp;amp; Skills&lt;/strong&gt;: List relevant projects, technologies, and certifications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Profile Picture &amp;amp; Banner&lt;/strong&gt;: A professional-looking picture and an industry-relevant banner can boost credibility.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom LinkedIn URL&lt;/strong&gt;: Keep it clean (e.g., linkedin.com/in/yourname).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. Identify the Right People to Connect With&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Instead of randomly messaging people, be strategic in whom you approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Look for employees working at your target company.&lt;/li&gt;
&lt;li&gt;Prioritize recruiters, hiring managers, or senior engineers in your domain.&lt;/li&gt;
&lt;li&gt;Check if you have mutual connections—this makes it easier to break the ice.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. Send a Personalized Connection Request&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Avoid generic connection requests like “Hi, can you refer me?”. Instead, make it personal and relevant.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Connection Request&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hi [Name], I came across your profile while exploring opportunities at [Company Name]. I’m a [Fresher/Software Developer] with a keen interest in [specific domain]. I’d love to connect and learn from your experience. Looking forward to your insights. Thanks!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. Build a Conversation Before Asking for a Referral&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Once they accept your request, don’t rush to ask for a referral immediately. Build a small rapport first:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Thank them for accepting your request.&lt;/li&gt;
&lt;li&gt;Mention something interesting about their work or company.&lt;/li&gt;
&lt;li&gt;Subtly ask about job openings or referrals.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Example Follow-up Message&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thanks for accepting my request, [Name]! I see that [Company Name] is working on some exciting projects. As a fresher, I’m eager to start my career in this field. If you have any insights or know of any suitable openings, I’d greatly appreciate your guidance. Let me know how I can share my details.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;5. Engage with Posts &amp;amp; LinkedIn Groups&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Comment on posts from recruiters or industry experts.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Share insights&lt;/strong&gt; related to software development, code quality, or performance optimization to showcase your expertise.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Join LinkedIn groups&lt;/strong&gt; where recruiters post jobs and network with professionals in your field.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;6. Use the “Open to Work” Feature&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Enable the “Open to Work” setting on LinkedIn to be visible to recruiters. Set your job preferences correctly to attract the right opportunities.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;7. Apply &amp;amp; Follow Up Strategically&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When you see a job opening:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Apply through the company website.&lt;/li&gt;
&lt;li&gt;Reach out to a connection within the company.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Example Message&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hi [Name], I just applied for [Job Title] at [Company Name]. If you have any insights about the role or team, I’d love to hear them. Appreciate any guidance!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This approach increases your chances of getting a response from recruiters or a referral from employees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finding a job through LinkedIn requires a combination of profile optimization, strategic networking, and engagement. By following this approach, you can build genuine connections and improve your chances of landing your next opportunity.&lt;/p&gt;

&lt;p&gt;Have you tried any of these strategies? Share your experiences in the comments!&lt;/p&gt;

</description>
      <category>career</category>
      <category>beginners</category>
      <category>programming</category>
      <category>development</category>
    </item>
  </channel>
</rss>
