Blogs

Here is where we discuss everything from strategy and technology to creativity and coding. Go ahead and have fun exploring.

Faster and lesser coding using Javascript Array Functions
Artificial Intelligence

Faster and lesser coding using Javascript Array Functions

May 5, 2020

I’m pretty sure that most of us haven’t benefited from some of these amazing Javascript Array functions we’re going to discuss here. These functions are very useful and will definitely speed up your development.

We will use the following JSON data for this tutorial. It is an array of product information, including title, category, price, etc.

Take a look at this data before proceeding to the blog. We’re going to perform different operations on this data and learn about some amazing Array functions.

The code snippets are self-explanatory. If you have any questions or suggestions,please let me know in the comments.

Bonus trick in the end 😉

Before getting into the Array functions, I’d like to introduce you to Arrow functions (also called “fat arrow” functions). Arrow functions allow us to write shorter functions

Below is a normal JS function

Now let's re-write above Fn using Arrow function

Both the codes produces following output => “Hello Professor”

All of the Array Functions we are going to discuss today takes a callback function as input and we’ll be writing those callbacks using arrow functions.

Let’s get our hands dirty.

.map() Goal: get list of all product titles

Latest Updates

  • Ethics

    Ethics in Everything

    Nobody has a problem in being a Law-abiding person. But when it comes to areas where a definite Law or policy has not been enacted, the discretion is at the mercy of ethical values the person holds.

    September 7, 2018
  • Products

    Two Factors that influence to build successful products

    Every product is unique on its own and has a life cycle. After the product is introduced, it is hand held by the creator till it reaches the growth stage.

    June 20, 2018
  • DIGITAL TRANSFORMATION

    Relooking Digital Transformation at the Grassroot Level

    Any Transformation will be complete only if it takes into account all its integral constituent entities. It is heartening to see the pace at which developing countries like India is embracing technology in payments, education etc.

    May 13, 2018