Implement negate(predicate)
Write negate(predicate) that returns a new predicate function which returns the boolean opposite of predicate, forwarding whatever arguments it's called with.
const isEven = (n) => n % 2 === 0;
const isOdd = negate(isEven);
[1, 2, 3, 4].filter(isOdd); // [1, 3]