// Complete the arrayManipulation function below. function arrayManipulation(n, queries) { let arr = new Array(n).fill(0); for (let [a, b, k] of queries) { let arrSlice = arr.slice(a - 1, b); let updatedArrSlice = arrSlice.map(el => el + k); arr = [...arr.slice(0, a - 1), ...updatedArrSlice, ...arr.slice(b + 1)]; } return Math.max.apply(Math, arr); }