The 3 Common Ways of Writing Functions

<p>A page from my notes on JavaScript as a quick reference on functions.</p> <p>From the numerous articles I read and the videos I watched, I learned that modern computing is all about abstraction from the binary code to complex programs (and from the micro-circuits to the complex robots). And when I learn to code in JavaScript, the first such example of abstraction comes in the form of functions. How convenient it is to store a chunk of code into a function and evoke it all the time, we need to reuse it. As my learning journey progresses into React, I again see similar functional components as reusable modules doing certain tasks or rendering certain elements when we call them without me getting into their body all the time &mdash; the intricate details are all hidden inside.</p> <p>The first step to harness the full potential of functions is to master the syntaxes or structure of the function. So I made sure that in my personal notes on JavaScript, I dedicate a page to jot down some of the key details of function syntaxes. Let me share the same with you all so you can consider this as a quick refresher:</p>
Tags: Functions