TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Clean code practices with JavaScript

12 pointsby tirthbodawalaalmost 7 years ago

2 comments

tirthbodawalaalmost 7 years ago
Any improvement suggestions are welcome
TechRomanceralmost 7 years ago
&gt; Arrow functions are more compact and have shorter syntax than function expression, and it utilises =&gt;, that looks like a fat arrow.<p>It&#x27;s probably worth noting that the arrow syntax isn&#x27;t <i>just</i> shorthand, it also maintains `this` from the outer scope. (or rather, doesn&#x27;t define its own)<p>MDN has an excellent write up on the nuances: <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;JavaScript&#x2F;Reference&#x2F;Functions&#x2F;Arrow_functions" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;JavaScript&#x2F;Refe...</a>