Join Joe Marini for an in-depth discussion in this video Array operations, part of Learning Underscore.js.
Now let's take a look how to use Underscore…to perform additional operations on the contents of arrays.…So, I've scrolled down here to the array operations part of the…example snippets and I'm going to open up in chapter three, arrayops_start.…And you can see that I've started off by filling…out some array information that we'll use to exercise the functions.…And I have got no reference to the…container div, which is down here in the body,…which is where we'll display the results.…So, over here in the snippets, let's start by copying these lines, and what we are…going to do is exercise the without function…that's in underscore, so we'll copy and we'll paste.…
You can use the without function to remove unwanted values from an array.…So take a look at array one right here. It has values…from zero up through nine inclusive. So here, on line 15, we'll…say var result is equal to and we'll make a paragraph tag to indicate the results.…And then we'll use the _without function on array…one to remove the values zero, two, and three.…
- Understanding what Underscore.js is and does
- Installing Underscore.js
- Sorting, grouping, and filtering data sets
- Extracting information about arrays and objects
- Using templates to format data