Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started