The _.lt() method checks if value is less than the other value.
Parameters: This method accepts two parameters as mentioned above and described below:
- value: This parameter holds the first value that need to compare.
- other: This parameter holds the other value that is compare with.
Return Value: This method returns true if value is less than other else false.
Example 1: Here, const _ = require(‘lodash’) is used to import the lodash library in the file.