function packObject(array) {
    const result = {};
    const length = array.length;
    for (let i = 1; i < length; i += 2) {
        result[array[i - 1]] = array[i];
    }
    return result;
}
Pack an array to an Object

@param {array} array
@return {object}
@example
```js
> packObject(['a', 'b', 'c', 'd'])
{ a: 'b', c: 'd' }
```