Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions

Question

During the RFP stage, B2B buyers

Answered: 1 week ago