Question: Can anyone help me with this code, I have broken it down into four steps to simplify it. I am in need of help desperately.
Can anyone help me with this code, I have broken it down into four steps to simplify it. I am in need of help desperately.
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
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. .
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.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
