Question
Modify the statement from Question 13 so that it creates a persistent cookie that will expire two years from its creation date.
Step 1
Here's an example of how you can modify the statement to achieve this: ```javascript document.cookie = "cookieName=cookieValue; expires=" + new Date(new Date().getTime() + (2 * 365 * 24 * 60 * 60 * 1000)).toUTCString() + "; path=/"; ``` In this modified Show more…
Show all steps
Your feedback will help us improve your experience
Watch the video solution with this free unlock.
EMAIL
PASSWORD