Adding multiple keys and values to cookie - Javascript
<p>I need help with making a cookie thats going to have a lot of different values. So far I have this.</p>

<pre><code>function makeCookie(key, value) {
document.cookie= key + "=" + value + "; path=/";}

//event listener to kick off the cookie function
var style1button = document.getElementById('style1');
style1button.addEventListener('click',function ()
{makeCookie('style','style1')},false);

//event listener to kick off the cookie function
var style2button = document.getElementById('style2'); 
style2button.addEventListener('click',function(
{makeCookie('style','style2')},false);
</code></pre>

<p>I am going to be adding in more and I will end up needing to make a cookie more then one style, but I am not sure how to pass through multiple key,values into the same function I have setup. Or is it literally just making up new names instead of</p>

<pre><code>makeCookie(key, value)
</code></pre>

<p>can I do</p>

<pre><code>makeCookie(key1, value1, key2, value2......)
</code></pre>

<p>I apologize if this is easy, I am new at this. After looking at the document.cookie info from multiple sites, I am not able to find anything that makes sense. </p>