Question: Create a function expression named getBallSports getBallSports function should contain a parameter named sportsAr. This sportsAr parameter should have the structure of the newly mapped

Create a function expression named getBallSports
getBallSports function should contain a parameter named sportsAr. This sportsAr parameter should have the structure of the newly mapped array from the previous section.
Call the function getBallSports with the argument being the mappedSports from the previous section.
Use console.log to verify your results
Until you finish the next step the console will show undefined
The getBallSports is NOT the "filtering function" iteself. It is where the "filtering" operation will happen to the array named sportsAr.
The "filtering function" will be defined within getBallSports so it will be a "function within a function"
getBallSports should filter the array called sportsAr
The filtering logic will return true if the name property of the individual sport is either "Baseball" or "Soccer".

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!