In JavaScript, a cookie can only hold one "string" value, hence storing multiple key-value pairs needs numerous cookies. Using numerous cookies, on the other hand, can produce issues.
For each key-value pair you want to save, create a cookie: document. cookie = "myCookie=myValue"; document. cookie = "myOtherCookie=myOtherValue"; document. cookie = "myOtherCookie=myOtherValue"
Share a personalized message with your friends.