Page 1 of 1

Cookies in Vanilla JavaScript only 1. Cookie (read, write and delete cookie): A form (first name, last name , email etc)

Posted: Sun Jul 03, 2022 12:01 pm
by answerhappygod
Cookies in Vanilla JavaScriptonly
1. Cookie (read, write and delete cookie): Aform (first name, last name , email etc) should save a cookie fromone page, then read this cookie on anotherpage. This must use at least two separatepages.
i) If no cookies ,then alert no cookie found. If cookie is there ...then cookieis saved.
2. More than one field from the first page must be read onto thesecond page. For example “Shopping cart” that gives the user theability to review submitted data on another page.
that means cookies/results on, Displayingsaved cookies/results on the other page.
3. Your cookie must persist for 2years so that it will still be available if thebrowser is closed and re-opened. This must be dynamic, so it willbe always 2 years from the current year.
4. Add the ability to delete the cookie (for example “Clearshopping cart”)
5. Show the current date and time on bothpages, nicely formatted for the user, and clearlyvisible. Use 12 hour clock, (i.e.:1:30PM) 6. JavaScript source code is well-formatted and easy toread.
7. Use JavaScript comments whereverpossible. Please explain what the code isdoing.