You're given a sorted array of consecutive integers that runs from nums[0] up to nums[nums.length - 1], with exactly one integer missing from the middle of the run. Return that missing integer. The endpoints are always present, so the array's first and last values mark the true bounds of the sequence.
// nums: number[] — sorted, consecutive integers with exactly ONE gap.
// The first and last elements are the true endpoints.
// returns: number — the single integer missing from the run.
function arrayFindMissingNumberInSequence(nums): number;
// 3 is missing between 2 and 4.
arrayFindMissingNumberInSequence([1, 2, 4, 5]);
// → 3
// The run starts at 10, not 1; 12 is the gap.
arrayFindMissingNumberInSequence([10, 11, 13, 14]);
// → 12
nums[0] is the true start and the last element is the true end, so the missing number always sits strictly between them — never before the first or after the last.0, at a positive number, or at a negative number like -3. Don't assume it starts at 1.nums; return a single number.