subject

// given this zoo data from around the united states, follow the instructions below. use the specific array methods in the requests below to solve the problems.

const zooanimals = [

{ animal_name: "jackal, asiatic", population: 5, scientific_name: "canis aureus", state: "kentucky" },

{ animal_name: "screamer, southern", population: 1, scientific_name: "chauna torquata", state: "alabama" },

{ animal_name: "white spoonbill", population: 8, scientific_name: "platalea leucordia", state: "georgia" },

{ animal_name: "white-cheeked pintail", population: 1, scientific_name: "anas bahamensis", state: "oregon" },

{ animal_name: "black-backed jackal", population: 2, scientific_name: "canis mesomelas", state: "washington" },

{ animal_name: "brolga crane", population: 9, scientific_name: "grus rubicundus", state: "new mexico" },

{ animal_name: "common melba finch", population: 5, scientific_name: "pytilia melba", state: "pennsylvania" },

{ animal_name: "pampa gray fox", population: 10, scientific_name: "pseudalopex gymnocercus", state: "connecticut" },

{ animal_name: "hawk-eagle, crowned", population: 10, scientific_name: "spizaetus coronatus", state: "florida" },

{ animal_name: "australian pelican", population: 5, scientific_name: "pelecanus conspicillatus", state: "west virginia" },

];

/* request 1: .foreach()

the zoos want to display both the scientific name and the animal name in front of the habitats. populate the displaynames array with only the animal_name and scientific_name of each animal. displaynames will be an array of strings, and each string should follow this pattern: "name: jackal, asiatic, scientific: canis aureus."

*/

const displaynames = [];

console. log(displaynames);

/* request 2: .map()

the zoos need a list of all their animal's names (animal_name only) converted to lower case. using map, create a new array of strings named lowcaseanimalnames, each string following this pattern: "jackal, asiatic". log the resut.

*/

const lowcaseanimalnames = [];

console. log(lowcaseanimalnames);

/* request 3: .filter()

the zoos are concerned about animals with a lower population count. using filter, create a new array of objects called lowpopulationanimals which contains only the animals with a population less than 5.

*/

const lowpopulationanimals = [];

console. log(lowpopulationanimals);

/* request 4: .reduce()

the zoos need to know their total animal population across the united states. find the total population from all the zoos using the .reduce() method. remember the reduce method takes two arguments: a callback (which itself takes two args), and an initial value for the count.

*/

const populationtotal = 0;

console. log(populationtotal);

/*

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
What is added to the < meta > tag to describe the encoding type?
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
The gene form of a trait is called a(n) 
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
The initial tableau of a linear programming problem is given. use the simplex method to solve it. x 1 x 2 x 3 s 1 s 2 z 1 2 4 1 0 0 8 3 4 1 0 1 0 10 minus3 minus12 1 0 0 1 0 the maximum is nothing when x 1equals nothing, x 2equals nothing, x 3equals nothing, s 1equals3, and s 2equals0. (be sure to simplify to lowest terms if necessary.)
Answers: 2
You know the right answer?
// given this zoo data from around the united states, follow the instructions below. use the specifi...
Questions
question
Mathematics, 02.08.2019 04:00
Questions on the website: 13722363