Join Joe Marini for an in-depth discussion in this video Using the exercise files, part of Learning Underscore.js.
I've included a set of exercise files for you to work on, as you complete this course. You can just download them, and extract the folder and put it somewhere on your computer, where it is easy to access. Now, I've put the exercise files here, on my desktop, but, you're not required to do that. You can put this folder anywhere on your computer, that you like. It's just a self-contained folder, that contains the code, that we're going to be using, in this course. So let's open the folder, and take a look at what's inside. ' Kay you can see, that I've laid out the exercise files folder, according to the chapters in which I present each one of the concepts, in this course.
So you got chapters two, three, four, and five that contain examples. I've also included a file named example snippets.txt. Example snippets contain the code snippets, that I will be using, to build each example in the course and you can use this code as well, to build the examples as you see fit. Basically I'm using this file, so that you don't have to sit there and watch me type the code out. I've also included a sample data.JS file. This file contains the sample code, that we will be using to exercise each of underscore's features and functions, in the course.
Don't worry if you don't have a .project file. That .project file is created by the tool that I'm using, which is Aptana studio and it's automatically managed by the tools. So if you're not using Aptana Studio, you won't see that file. But don't worry about it, you don't really need it. You can also see that I've placed _js and _minjs here, in the exercise files folder. Now, you'll need to down load those files yourself, if you want use them, and since you'll need to use them for the course, you should put them here, in the exercise files folder because the examples in each one of the folders in chapters two through five expect to find the underscore file at the root level, here of the exercise files folder.
Let's take a look at how each chapter is laid out. In each chapter, I've provided two different points for each particular example. You'll notice that the files are named according to a convention. Some of them end with _start and some of them end with _finished. The _Start version of each file is the starting point, that I'm going to use, to build towards the finished example for that piece of code and for that particular functionality in _.
The _Finished version of the file, is the example in its finished state. Now, how you want to use these files, is entirely up to you. If you want to use the _start file to follow along with me, while I'm doing each example, then that's great. If you'd rather just jump to the finished version of the file, to see how everything works for yourself and play around with it, that's also great, it's entirely up to you. With that out of the way, we are ready to get coding with _.
- 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