Answered step by step
Verified Expert Solution
Question
1 Approved Answer
TASK 4 (Collections allu ilerlium) You are required to create a JavaScript nested data structure representing lake depths in fathoms. You are then required to
TASK 4 (Collections allu ilerlium) You are required to create a JavaScript nested data structure representing lake depths in fathoms. You are then required to find the deepest lake in the collection, and display its name and depth in metres. Caspian Sea 560 Tarn Hows 53 Crater Lake 324 Lake Tanganyika 803 Lake Vostok 546 Lake Baikal 897 Lake depths in fathoms 1. The application should contain (i) a function to get the deepest lake (ii) a function to convert the depth given in fathoms into metres and (iii) a function to display the deepest lake name and its depth in metres in the console. 2. There should be no global variables. 3. The application should: a. Use the most appropriate nested data structure to hold the lake data. b. Iterate through the data structure using the most appropriate approach C. Display the deepest lake depth to two decimal places. d. Use an Immediately Invoking Function Expression to constrain the program scope (e.g. To stop the program from containing global variables). The output of the application should be as follows: The deepest lake is: Lake Baikal This lake is 1640.43m deep. Save your work as username iv tma task4 is and username iv tmg task 4 html in a
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