Underscore.js
is a JavaScript library that provides a collection of utility methods that help web developers work more efficiently and focus on the actual implementation of their application rather than bothering with repetitive algorithmic problems. Underscore.js
is, by default, accessible through the "_
" identifier of the global namespace and that's exactly where its name comes from.
Note
As with the $
identifier in jQuery, the underscore "_
" identifier can also be used as a variable name in JavaScript.
One of the utility functions that it provides is the _.template()
method, which provides us with a convenient way of interpolating specific values into existing template strings that follow a specific format. The _.template()
method recognizes three special placeholder notations inside templates, which are used to add dynamic characteristics: