Question: 1. Using JavaScript, create an array which loops through number 1 to 10 as index (i). 2. Calculate the area of a trapezoid then append

1. Using JavaScript, create an array which loops through number 1 to 10 as index (i).

2. Calculate the area of a trapezoid then append the value as an object to the array.

3. Each object must have the following key-values,

h = i /2;

a = h * 4;

b = i;

area = ((a+b)/2)*h;

4. Using the filter method, filter the array of the trapezoid to find all the records with an integer height.

5. Using the find method, find the record from the trapezoid which has a "base a" of 20.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!