Lodash - noop method



Syntax

_.noop()

This method returns undefined.

Example

var _ = require('lodash');

console.log(_.times(2, _.noop));

Save the above program in tester.js. Run the following command to execute this program.

Command

\>node tester.js

Output

[ undefined, undefined ]
lodash_util.htm
Advertisements