Question: Take a moment to read through the code below. const locations = { } ; function createSecretLocation ( lat , lon, passcode ) { if
Take a moment to read through the code below.
const locations ;
function createSecretLocationlat lon, passcode
if lat lon passcode
throw"latitude, longitude, and passcode are required!";
try locationslatlon passcode; catch error locationslat; locationslatlon passcode;
What will be the last line of code run in the createSecretLocation function if the function is called as follows:
createSecretLocation "ROCKYMOUNTAINS";
A throw "latitude, longitude, and passcode are required!";
B locationslatlon passcode; inside the try block.
C locationslatlon passcode; inside the catch block.
D None of the above
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
