Draft
Sorting the storms.
4Ned_
Description:
Sorting The Storms
You are tasked with bulding a webpage which displays storm data. You are given the storm data as an Array of Objects.
you need to implement a filter based on two input parameters.
Example:
A user wants to see all storms with type tornado in the Philippines.
inputParams = {location: "Philippines", stormType: "Tornado" }
output = [
{ name: 'Dipolog', location: 'Philippines', stormType: 'Tornado' },
{ name: 'Malita', location: 'Philippines', stormType: 'Tornado' }
]
Storm Type Options:
- Blizzard,
- Firestorm,
- Ice Storm,
- Tropical Cyclone,
- Tornado
Location Options:
- Philippines,
- North America,
- United Kingdom,
- Austrailia,
- All Locations
location input includes 'All Locations'
if input is empty return empty array
if input is invalid return empty array
if input location is invalid return empty array
if no results found return empty array
Similar Kata:
Stats:
Created | Mar 11, 2022 |
Warriors Trained | 6 |
Total Skips | 0 |
Total Code Submissions | 13 |
Total Times Completed | 4 |
JavaScript Completions | 4 |
Total Stars | 0 |
% of votes with a positive feedback rating | 17% of 3 |
Total "Very Satisfied" Votes | 0 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 3 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 7 kyu |