....... Below is the coding challenge that I am to undertake for the Udemy JavaScript 2020 course. I have started work on this on 13th June 2020. .......
Suppose that you're working in a small town administration, and you're in charge of two town elements:
- Parks
- Streets
It's a very small town, so right now there are only 3 parks and 4 streets. All parks and streets have a name and a build year.
At an end-of-year meeting, your boss wants a final report with the following:
- Tree density of each park in the town (forumla: number of trees/park area)
- Average age of each town's park (forumla: sum of all ages/number of parks)
- The name of the park that has more than 1000 trees
- Total and average length of the town's streets
- Size classification of all streets: tiny/small/normal/big/huge. If the size is unknown, the default is normal
All the report data should be printed to the console.
HINT: Use some of the ES6 features: classes, subclasses, template strings, default parameters, maps, arrow functions, destructuring, etc.
("Green Park", 1987, 0.2, 215), ("National Park", 1894, 2.9, 3541), ("Oak Park", 1953, 0.4, 949),
("Ocean Avenue", 1999, 1.1, 4), ("Evergreen Street", 2008, 2.7, 2), ("4th Street", 2015, 0.8), ("Sunset Boulevard", 1982, 2.5, 5)