![]() |
VOOZH | about |
Underscore.js is a JavaScript library that makes operations on arrays, string, objects much easier and handy. The _.noop() function is used to return "undefined" irrespective of the arguments passed to it.
Note: It is very necessary to link the underscore CDN before going and using underscore functions in the browser. When linking the underscore.js CDN The "_" is attached to the browser as global variable.
Syntax:
_.noop();
Parameters: It takes optional parameter of any type.
Return Value: This function returns the value of type undefined.
Example 1:
Output:
👁 ImageExample 2:
Output:
👁 ImageExample 3: Passing parameters to the _.noop() function.