var i, newArr = array[0]; for (i=1; i<array.length; ++i) { newArr[i] = newArr[i-1] + "/" + array[i]; }