Question: How should the code be written to include the h2 date h2 element in the dateHTML instructions, the third instruction under the Variable Declaration header.

How should the code be written to include the "h2 date h2" element in the dateHTML instructions, the third instruction under the "Variable Declaration" header. I cannot decifer the error code at the right of the screenshot.

How should the code be written to include the "h2 date h2"

(Saturday). + Back 13 the Bridger College student union. Variable Declaration 15 */ Test Results Declare the thisDate variable containing the Date object for the date October 12, 2018. /root/sandbox bc_fbicon.png bc_logo.png bc_quiz.png 2bc_reset.css bc_styles.css abc_today.js Ebc_twittericon.png 2bc_union.html 3/4 passed Code Pattern Declare the dateString variable containing the text of the thisDate variable using local conventions. 17 var thisDate = new Date("October 12, 2018"); 18 var dateString = thisDate.toLocaleDateString(); 19 var dateHTML= dateString.valueof(); 20 var thisDay = thisDate.getDay(); X FAILED: Declared dateHTML variable 22 var eventHTML = .getEvent(thisDay); Declare the dateHTML variable containing the following text string

date

where date is the value of the dateString variable. DESCRIPTION Searched your code for a specific pattern: 24 document.insertAdjacentHTML("unionToday nnerHTML = dateHTML + eventHTML; 25 dateHTML\s*=.+h2 You can learn more about regular expressions here. Create the thisDay variable containing the day of the week number from the thisDate variable. (Hint: Use the getDay() method.) 26 function getEvent (day) { var eventHTML; switch (day) { case 0: // Sunday Events eventHTML = "

\
Highlights from the Bridge Art Collection
\ ? PASSED: Declared dateString variable

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!