3

I am trying to use lodash in a Node.js project. If I require the module using the following statement, it works fine:

var lodash = require("lodash");

However, if I change the statement to something like this:

var _ = require("lodash");

then the variable underscore _ is undefined. Not sure why this is happening and also could not find anything online regarding this.

Mandeep Singh
  • 7,064
  • 18
  • 60
  • 100

0 Answers0