The function was defined as follow, but I don't know how the function will work if I pass in only one parameter and ignore the order.

```
function setCookie(name,value,path,expires){

    value = escape(value);
    if(!expires){
        var now = new Date();
        now.setMonth(now.getMonth() + 6);
        expires = now.toUTCString();
    }
    if(path){
        path = ";path = " + path;
        }

    document.cookie = name + "=" + value + ";expires = " + expires + path;
    }

```