Create a method sum13(nums) that takes an array of integers, nums and returns the sum of the numbers in the array. However, the number 13 is very unlucky, so do not add it or the number that comes immediately after a 13 to the sum. Return 0 if nums is an empty array.
Create a method has22(nums) that takes an array of integers, nums and returns true if there are at least two items in the list that are adjacent and both equal to 2, otherwise return false.
Create the total89(nums) method below that takes an array of integers, nums, and returns the total of the numbers in nums except for all numbers in the array between an 8 and a 9 (inclusive).
Create a method twoSum(nums, target) that takes an array of integers nums and an integer target and returns an array with the indices of two numbers such that they add up to target. If no two numbers add up to target, it returns an empty array. Assume that each input has exactly one solution, and you may not use the same element twice.