<?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: Md Shijan Ali</title>
    <description>The latest articles on DEV Community by Md Shijan Ali (@mdshijanali).</description>
    <link>https://dev.to/mdshijanali</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%2F1688794%2F9392b779-d40c-41ff-b8b8-2f410a8c54a0.jpeg</url>
      <title>DEV Community: Md Shijan Ali</title>
      <link>https://dev.to/mdshijanali</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mdshijanali"/>
    <language>en</language>
    <item>
      <title>🚀 5 Must-Know Modern JavaScript Tips for Cleaner Code</title>
      <dc:creator>Md Shijan Ali</dc:creator>
      <pubDate>Fri, 27 Jun 2025 05:50:19 +0000</pubDate>
      <link>https://dev.to/mdshijanali/5-must-know-modern-javascript-tips-for-cleaner-code-3fom</link>
      <guid>https://dev.to/mdshijanali/5-must-know-modern-javascript-tips-for-cleaner-code-3fom</guid>
      <description>&lt;p&gt;Hey devs! Let’s talk &lt;strong&gt;JavaScript&lt;/strong&gt;—the language we love (and sometimes hate 😅). Here are 5 quick tips to write cleaner, more efficient code:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Destructuring Magic&lt;/strong&gt;&lt;br&gt;
No more &lt;code&gt;object.property&lt;/code&gt; chains!&lt;/p&gt;

&lt;p&gt;javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const user = { name: 'Dev', age: 25, hobby: 'coding' };
const { name, age } = user; // Boom! Clean.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Optional Chaining &lt;code&gt;(?.)&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
Avoid &lt;code&gt;Cannot read property 'x' of undefined&lt;/code&gt; errors:&lt;/p&gt;

&lt;p&gt;javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const city = user?.address?.city || 'Not provided';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Template Literals&lt;/strong&gt;&lt;br&gt;
Ditch ugly string concatenation:&lt;/p&gt;

&lt;p&gt;javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(`Hello, ${name}! You’re ${age}? Awesome!`);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Arrow Functions + Implicit Return&lt;/strong&gt;&lt;br&gt;
Shorter syntax for small functions:&lt;/p&gt;

&lt;p&gt;javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const double = num =&amp;gt; num * 2; // 😍

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. &lt;code&gt;async/await&lt;/code&gt; Error Handling&lt;/strong&gt;&lt;br&gt;
Wrap it in a try-catch without &lt;code&gt;.then()&lt;/code&gt; hell:&lt;/p&gt;

&lt;p&gt;javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;try {
  const data = await fetchAPI();
} catch (err) {
  console.error("Oops!", err);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;💬 Discussion Time!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Which tip did you find most useful?&lt;/p&gt;

&lt;p&gt;Got any other JS pro-tips? Drop them below! 👇&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S. Follow me for more web dev nuggets!&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
