1. Find the missing number in the array Input: [1, 2, 3, 4, 6, 7, 8, 9, 10]
Output: 5 const find_missing = function(input) {
let n = input.length + 1; let sum = 0;
for (let i in input) {
sum += input[i];
} return Math.floor((n * (n + 1)) / 2) - sum;
}; 2. Inverting integers Input: num…