Multiple cookie values should be separated by ’;‘.
document.cookie = "username=John Doe; expires=Thu, 18 Dec 2013 12:00:00 UTC; path=/";
To fetch the value of a cookie we can assign the document.cookie property to a variable. For example: var cookies = document.cookie. We will then have to parse the values of the individual cookies
To delete a cookie, we need to set the value of the cookie to an empty string and the value of the expires property to the required value