IFSC 3300
HW14
Shorter HW due in 5 (five) days by MONDAY Dec. 5, 2022 (last day of class)

Please put your code in an email and send it to: IFSC3300HW@gmail.com.

1. Read up on cookie security and write 125 words or more about the topic.

2. Write code with buttons that: create a cookie with attribute "flavor" and value "chocolate chip" (or whatever your favorite kind is); displays the cookie; and changes the cookie value.

3. Add one(1) more button demonstrating an example of regular expressions using the "*" and "+" regular expression operators.

(Don't do the below, it is here for historical and perhaps future purposes only.)

4. Consider W3school's page on JS support for local storage. It has a "Try it Yourself" sandbox that has code you can modify for this problem if you like.

a) Create a variable called myObj and define it to have an address attribute and, as its value, some string like "33 Main St., Little Rock" or whatever you like.
b) Modify the setItem() call to be setItem("JSONstring", _______) where the underlined portion contains a call to stringify myObj. This will store your object as JSON text in the brower's hidden local storage area in a virtual file called JSONstring
c)Print the value of the stringified myObj so you can see what it looks like.
d) Modify the getItem() call and add any code necessary to retrieve the JSON text, parse it back into an object, and print the address.

Note to instructor: another possible cookies problem to consider for future use is:  Type into a form and save into cookies, using the example I gave for processing a form in its own web page.