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, 21.06.2019 23:00
Give an example of a case where a two-way handshake to establish a connection could leave one side of the connection live while the other side does not believe there is a connection.
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
When can you access the bios setup utility?
Answers: 1
question
Computers and Technology, 25.06.2019 01:30
Why is the most liked picture on instagram an eggy? owo
Answers: 1
question
Computers and Technology, 25.06.2019 03:30
All nate specialties are offered at two levels, a. journeyman and master. b. installation and service. c. apprentice and journeyman. d. heating and air conditioning.
Answers: 1
You know the right answer?
// given this zoo data from around the united states, follow the instructions below. use the specifi...
Questions
question
History, 02.06.2021 01:40
question
Mathematics, 02.06.2021 01:40
question
English, 02.06.2021 01:40
Questions on the website: 13722362