Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions