Question: Javascript Task 4 (Collections and Iteration) You are required to create a JavaScript nested data structure representing lake depths in fathoms. You are then required
Javascript

Task 4 (Collections and Iteration) 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. Count the lakes, and display the count using a word to represent the number. d. Sort the lakes by depth (descending). e. Display the deepest lake depth to two decimal places. f. 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: Lake Baikal 897 Lake Tanganyika 803 Caspian Sea 560 Lake Vostok 546 Crater Lake 324 Tarn Hows 53 There are six lakes. The deepest lake is Lake Baikal. Lake Baikal is 1640.43m deep Save your work as username_jy_tma_task4.js and username_jv_tma_task4.html in a folder called jv_tma_task4. 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
