Creates a function that negates the result of the predicate func. The func predicate is invoked with the this binding and arguments of the created function.
func
this
The predicate to negate.
Returns the new negated function.
5.13.0
function isEven(n) { return n % 2 == 0}filter([1, 2, 3, 4, 5, 6], negate(isEven))// => [1, 3, 5] Copy
function isEven(n) { return n % 2 == 0}filter([1, 2, 3, 4, 5, 6], negate(isEven))// => [1, 3, 5]
Creates a function that negates the result of the predicate
func
. Thefunc
predicate is invoked with thethis
binding and arguments of the created function.