I need to create a .js to use on a web page to show that days events.
first I needed to declare a var named thisDate containg October 12, 2018.
second create a var dateString containg the text of thisDate using local conventions.
third a dateHMTL var with the text string
date
.fourth make thisDay var containing the day of the week number from the thisDate var
fifth use the thisDay var as a parameter value call the getEvent function to get the HTML code of that days events and store it in a var called eventHTML
lastly apply the insertAdjacentHTML() method to the page element with the id unionToday insert the value of dateHTML plus eventHTML var before the end of the element
here is my code so far
function getEvent(day) {
var thisDate = new Date("October 12, 2018");
var dateStr = thisDate.toLocaleDateString();
var dateHTML = "<h2>" + dateStr + "</h2>";
var thisDay = new Date();
document.write(thisDay.getDay());
var eventHTML = ;
element.insertAdjacentHTML(“unionToday”) + dateHTML + eventHTML;