1var arraySign = function (nums) {2// use filter to find total negative numbers in the array3let negativeCount = nums.filter((n) => n < 0).length;45// check if the nums array has zero. If it does, then return 06if (nums.includes(0)) return 0;78// If negativeCount variable is even answer is 1 else -19return negativeCount % 2 === 0 ? 1 : -1;10};