+ 1
Javascript date - document.body.innerHTML = hours+":"+mins+":"+secs;
what does the syntax document.body.innerHTML = hours+":"+mins+":"+secs; mean?
2 Answers
+ 3
What's mentioned above. Document refers to the html. Body is the body tags. innerHTML is the methods/inline code in html. Your taking the variables hours, mins, and secs and seperating them with ":" in that order.
+ 2
BY USING THIS SYNTAX YOU ARE CHANGING OR SETTING CONTENT OF BODY TO DISPLAY TIME IN MENTIONED FORMAT.