Question: I am working on this Case Problem and have completed a portion of it which, now I need to check my work against someone else.

I am working on this Case Problem and have completed a portion of it which, now I need to check my work against someone else. I also need help completing it entirely. Here is the question..

Document Setup Go to the sd_map.html and sd_mapper.js files and enter your name and the date in the comment section of each file. Script Element Go to the sd_map.html file. Directly above the closing tag, insert a script element that links the page to the sd_mapper.js file. Defer the loading of the script file until after the rest of the web page is loaded by the browser. Study the contents of the file and then proceed to the next step. Go to the sd_mapper.js file. At the top of the file insert a statement to apply your JavaScriptcode with strict usage. Variable Declaration Declare a variable named thisTime containing a Date object for February 3, 2018 at 3:15:28 AM. Use the toLocaleString() method to save the text of the thisTime variable in the timeStr variable. Change the inner HTML code of the page element with the ID timestamp to the value of the timeStr variable. Sky Map Variable Next, you will determine which sky map to show in the web page. First, create a variable named thisHour, using the getHours() method to extract the hour value from the thisTime variable. Create a variable named thisMonth using the getMonth() method to extract the month number from the thisTime variable. The number of the map to use with the given hour and month is calculated with the formula (2month + hour) % 24 where month is the value of the thisMonth variable and hour is the value of the thisHour variable. Store the value of this formula in the mapNum variable. Sky Map HTML You will use JavaScript to write the HTML code for the inline element showing the sky image to use in the web page. Create a variable named imgStr that stores the following text string where Map is the value of the mapNum variable. (Hint: Use the + operator to combine text strings together and be sure to include the single quote character within the text strings.) For the page element with the ID planisphere, use the insertAdjacentHTML() to insert the value of the imgStr variable directly after the elements opening tag.

Go to the sd_map.html file and click the "Build Website" button. Verify that your planisphere map and date and time resemble that shown in the figure.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!