const arr = [
"media-center",
"events",
"current-events",
]
const arr2 = [
"media-center",
"media-center-events",
"media-center-events-current-events",
}
const arr2 = Object.keys(arr).reduce((result, i) => {
result.push(result.length ? result[i - 1] + '-' + arr[i] : arr[i]);
return result;
}, []);