Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a variable called mappedInstruments and assign the value of null. You will assign a value later. Create a declared function called getMappedInstruments The function
Create a variable called mappedInstruments and assign the value of null. You will assign a value later.
Create a declared function called getMappedInstruments
The function getMappedInstruments does not have any parameters
Within the getMappedInstruments function you will use the map method to map the array of instruments that belongs to the orchestra object.
Remember that the instruments array is a property of the orchestra
The map operation should return an array of objects with only one property:
description : this property should hold the result of concatenating the name and section of the mapped instrument.
Example: if the instrument has a name of trumpet and a section of brass, description should be trumpet brass
The resulting array of the map operation should be assigned to the variable mappedInstruments
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started