Question: Go to the project 0 9 - 0 3 . js file in your code editor. Create an if statement that tests whether the object

Go to the project09-03.js file in your code editor. Create an if statement that tests whether the object localStorage.sbloggerVisit exists. If it does exist, add the commands described in Steps 4,5,6, and 7.
Retrieve the value of the sbloggerVisit key from local storage and save the key value to the storedLastDate variable.
Display the value of storedLastDate as the text content of the lastVisitDate object to show the date of the users last visit to the website.
Declare the lastDate variable, storing within it a Date object using the value of the storedLastDate variable.
Create a for of loop that iterates through each item in the articleDates collection. Each time through the loop do the following for every posted article on the website:
Declare the articleDate variable storing within it a Date object containing the date text of the current item in the loop.
If articleDate is greater than lastDate (meaning that the article was posted after the users last visit) then add "new" to the HTML content of the current item in the articleDates collection.
If localStorage.sbloggerVisit does not exist (meaning this is the users first visit to the website), then do the following:
Change the text content of the lastVisitDate object to Welcome to SBlogger!
Create a for of loop that iterates through each item in the articleDates collection. Each time through the loop add "new

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!