Learn this before React

In this tutorial we will explore top fundamental JavaScript concepts necessary to know in order to have an effective React Js/React Native learning.

Table of contents

1.maps() and filters()

2.slice() and splice()

3.find() and findIndex()

4.destructuring()

5.rest and spread operators

6.promise

1.map

  • The arr.map method is one of the most useful and often used.
  • It calls the function for each element of the array and returns the array of results.

The syntax is :

let result = arr.map(function(item, index, array) {

});


filter

  • The find method looks for a single (first) element that makes the function return true.
  • If there may be many, we can use arr.filter(fn).

The syntax is similar to find, but filter returns an array of all matching elements

Read More