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 15:10
Consider a direct-mapped cache with 216 words in main memory. the cache has 16 blocks of 8 words each. it is a word-addressable computer (rather than a byte-addressable computer which we normally discuss). (a) how many blocks of main memory are there? (b) what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, cache block, and block offset fields (if they apply)? (c) to which cache block will the memory reference db6316 map?
Answers: 1
question
Computers and Technology, 22.06.2019 22:40
Least square fit to polynomial write a function leastsquarefit3pol that solves a linear system of equations to find a least squares fit of a third order polynomial to an experimental data set given as two row arrays. the function leastsquarefit3pol must explicitly solve a set of linear equations and cannot use polyfit. there should be no restriction on the size of the problem that can be solved.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
In my email i got a message it says a quick message and in message details on who its from its says nicole and under nicole is [email protected] -
Answers: 1
question
Computers and Technology, 24.06.2019 22:00
Is the process of organizing data to reduce redundancy. a. normalization b. primary keying c. specifying relationships d. duplication
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, 12.09.2021 09:20
question
History, 12.09.2021 09:20
question
Social Studies, 12.09.2021 09:20
question
Chemistry, 12.09.2021 09:20
question
Computers and Technology, 12.09.2021 09:20
question
Biology, 12.09.2021 09:20