avaScript NOTE: Dataset is defined below. Using the data set as a pre-defined variable in your program, write code that uses the dataset to print the FIRST NAMES ONLY of people who have BOTH above average English grades AND below average age from the dataset. The solutions for the textbook examples assume you are able to export in a framework like node.js, which is why in the data set I provide, I simply set the array of objects as a variable. Your code will be in the same file (treat it like any other array variable). You can do the same with the sample files the chapter provides. For example:   var ancestry = [   {      .. object ..   },   ... ] // your code here   Requirements: Cannot use any array type built-in functions except filter(), map(), and reduce().   var dataSet = [ { "name":"Maura Glass", "age":60, "math":97, "english":63, "yearsOfEducation":4 }, { "name":"James Gates", "age":55, "math":72, "english":96, "yearsOfEducation":10 }, { "name":"Mills Morris", "age":26, "math":83, "english":77, "yearsOfEducation":10 }, { "name":"Deena Morton", "age":57, "math":63, "english":63, "yearsOfEducation":10 }, { "name":"Edith Roth", "age":38, "math":79, "english":94, "yearsOfEducation":10 }, { "name":"Marva Morse", "age":31, "math":93, "english":78, "yearsOfEducation":9 }, { "name":"Etta Potts", "age":48, "math":57, "english":93, "yearsOfEducation":7 }, { "name":"Tate Moss", "age":22, "math":83, "english":64, "yearsOfEducation":8 }, { "name":"Sanders Burris", "age":27, "math":65, "english":66, "yearsOfEducation":5 }, { "name":"Latoya Malone", "age":35, "math":100, "english":100, "yearsOfEducation":5 }, { "name":"Wade Foreman", "age":25, "math":76, "english":87, "yearsOfEducation":10 }, { "name":"Miller Valentine", "age":31, "math":56, "english":89, "yearsOfEducation":6 }, { "name":"Rita Olson", "age":53, "math":100, "english":52, "yearsOfEducation":6 }, { "name":"Potter Newton", "age":29, "math":91, "english":75, "yearsOfEducation":5 }, { "name":"Madeline Bartlett", "age":23, "math":60, "english":74, "yearsOfEducation":10 }, { "name":"Tamara Tran", "age":46, "math":73, "english":78, "yearsOfEducation":4 }, { "name":"Elena Evans", "age":43, "math":60, "english":82, "yearsOfEducation":10 }, { "name":"Cote Merrill", "age":55, "math":86, "english":63, "yearsOfEducation":7 }, { "name":"Madeleine Brennan", "age":52, "math":82, "english":88, "yearsOfEducation":4 }, { "name":"Alford Weber", "age":38, "math":71, "english":85, "yearsOfEducation":4 }, { "name":"Kirsten Daniel", "age":35, "math":86, "english":61, "yearsOfEducation":8 }, { "name":"Melton Chan", "age":26, "math":55, "english":96, "yearsOfEducation":4 }, { "name":"Mcmahon Woodward", "age":54, "math":56, "english":63, "yearsOfEducation":9 }, { "name":"Helga Monroe", "age":29, "math":79, "english":92, "yearsOfEducation":5 }, { "name":"Patricia Herrera", "age":46, "math":94, "english":99, "yearsOfEducation":10 }, { "name":"Mccullough Lambert", "age":56, "math":65, "english":96, "yearsOfEducation":8 }, { "name":"Haynes Davidson", "age":60, "math":86, "english":50, "yearsOfEducation":5 } ]

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

JavaScript

NOTE: Dataset is defined below.

Using the data set as a pre-defined variable in your program, write code that uses the dataset to print the FIRST NAMES ONLY of people who have BOTH above average English grades AND below average age from the dataset.

The solutions for the textbook examples assume you are able to export in a framework like node.js, which is why in the data set I provide, I simply set the array of objects as a variable. Your code will be in the same file (treat it like any other array variable). You can do the same with the sample files the chapter provides. For example:
 

var ancestry = [
  {
     .. object ..
  },
  ...
]

// your code here

 

Requirements:

  • Cannot use any array type built-in functions except filter(), map(), and reduce().

 

var dataSet = [
{
"name":"Maura Glass",
"age":60,
"math":97,
"english":63,
"yearsOfEducation":4
},
{
"name":"James Gates",
"age":55,
"math":72,
"english":96,
"yearsOfEducation":10
},
{
"name":"Mills Morris",
"age":26,
"math":83,
"english":77,
"yearsOfEducation":10
},
{
"name":"Deena Morton",
"age":57,
"math":63,
"english":63,
"yearsOfEducation":10
},
{
"name":"Edith Roth",
"age":38,
"math":79,
"english":94,
"yearsOfEducation":10
},
{
"name":"Marva Morse",
"age":31,
"math":93,
"english":78,
"yearsOfEducation":9
},
{
"name":"Etta Potts",
"age":48,
"math":57,
"english":93,
"yearsOfEducation":7
},
{
"name":"Tate Moss",
"age":22,
"math":83,
"english":64,
"yearsOfEducation":8
},
{
"name":"Sanders Burris",
"age":27,
"math":65,
"english":66,
"yearsOfEducation":5
},
{
"name":"Latoya Malone",
"age":35,
"math":100,
"english":100,
"yearsOfEducation":5
},
{
"name":"Wade Foreman",
"age":25,
"math":76,
"english":87,
"yearsOfEducation":10
},
{
"name":"Miller Valentine",
"age":31,
"math":56,
"english":89,
"yearsOfEducation":6
},
{
"name":"Rita Olson",
"age":53,
"math":100,
"english":52,
"yearsOfEducation":6
},
{
"name":"Potter Newton",
"age":29,
"math":91,
"english":75,
"yearsOfEducation":5
},
{
"name":"Madeline Bartlett",
"age":23,
"math":60,
"english":74,
"yearsOfEducation":10
},
{
"name":"Tamara Tran",
"age":46,
"math":73,
"english":78,
"yearsOfEducation":4
},
{
"name":"Elena Evans",
"age":43,
"math":60,
"english":82,
"yearsOfEducation":10
},
{
"name":"Cote Merrill",
"age":55,
"math":86,
"english":63,
"yearsOfEducation":7
},
{
"name":"Madeleine Brennan",
"age":52,
"math":82,
"english":88,
"yearsOfEducation":4
},
{
"name":"Alford Weber",
"age":38,
"math":71,
"english":85,
"yearsOfEducation":4
},
{
"name":"Kirsten Daniel",
"age":35,
"math":86,
"english":61,
"yearsOfEducation":8
},
{
"name":"Melton Chan",
"age":26,
"math":55,
"english":96,
"yearsOfEducation":4
},
{
"name":"Mcmahon Woodward",
"age":54,
"math":56,
"english":63,
"yearsOfEducation":9
},
{
"name":"Helga Monroe",
"age":29,
"math":79,
"english":92,
"yearsOfEducation":5
},
{
"name":"Patricia Herrera",
"age":46,
"math":94,
"english":99,
"yearsOfEducation":10
},
{
"name":"Mccullough Lambert",
"age":56,
"math":65,
"english":96,
"yearsOfEducation":8
},
{
"name":"Haynes Davidson",
"age":60,
"math":86,
"english":50,
"yearsOfEducation":5
}
]
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
User Defined DataType
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education