function convertMapToArray(map) {
    const result = [];
    let pos = 0;
    map.forEach(function (value, key) {
        result[pos] = key;
        result[pos + 1] = value;
        pos += 2;
    });
    return result;
}
Convert a map to an array

@param {Map} map
@return {array}
@example
```js
> convertMapToArray(new Map([[1, '2']]))
[1, '2']
```