Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

without creating class in javaScript TASK 4 (Collections allu ilerlium) You are required to create a JavaScript nested data structure representing lake depths in fathoms.

without creating class in javaScript

image text in transcribed

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

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions