const countPositivesSumNegatives = (input) => {
if (input.length === 0) {
return [];
}
const positive = input.filter((num) => num > 0).length;
const sumOfnegative = input.filter((num) => num < 0).reduce((acc, num) => acc + num, 0);
return [positive, sumOfnegative];
};