Underscore.js is one of the most popular modern JavaScript libraries used for functional programming. It can be used as a …