React.js Core Concepts

Masud Rana
Nov 5, 2020

1) Filter and Find

Filter

filter is used for conditional purpose. suppose at a playground, there have 50 players and there age is 15 to 32. If you choose only 20+ aged players, then i used filter.

Find

Find is used for getting one result. If i use find for that player, I just get first one.

02) Find max element:

Here, we declare a variable before for loop at the top.

We check every element in this array and find the largest element and assign the max variable.

In this example, this is the Math.max method. We can easily use this method.

3) Remove duplicate item from an array

If there have a 2 elements in a arry , we can remove bellow this method

4) Define Sum in the Array:

First at top declare a sum variable.

Then I start for loop for catching every element in this array.

Then I added this element to the sum variable.

5) Factorialize a Number with a WHILE loop

--

--

Masud Rana
0 Followers

front end react developer and wordpress expert . I want to learn about new topic .