![]() |
VOOZH | about |
Underscore.js is a JavaScript library that provides a lot of useful functions that help in the programming in a big way like the map, filter, invoke, etc even without using any built-in objects.
The _.negate() function is an inbuilt function in Underscore.js library of JavaScript which is used to find a new negated version of the stated predicate function.
Syntax:
_.negate(predicate)
Parameters: It accepts a single parameters which is specified below:
Return Value: This method returns a new negated version of the stated predicate function.
Example 1:
Output:
undefined
Example 2: