Getting ready

First of all, we need to add lodash.js to our web page. We can download lodash.js from https://lodash.com/ or add it from CDN (like we did when using Bootstrap).

It is considered a best practice to use minified versions of CSS and JS files. Almost every framework provides both un-minified and minified versions of CSS and JS files.
The un-minified versions are suitable for development environments, and minified versions are suitable for production environments.

Let's create a HTML5 file and add lodash.js from CDN, as follows:

<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>Lodash demo</title> <script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script> </head> <body> </body> </html>  ...

Get ASP.NET Core MVC 2.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.