Transcript from the "Underscore.js Introduction" Lesson
>> Bianca Gandolfo: So now we're finally to the point where we can talk about Underscore. So we talked scope, we talked about how closures worked. We talked about the complexities between parameter versus an argument and how all these components work together and now we can use the utility library like Underscore js which combines all these concepts into a handy library that gives us all the utility functions that allows us to do some pretty cool things.
[00:00:35] So first thing is, has anyone used the library here? Raise your hand if you've used a library before. Cool, so underscore is just a library. Which basically a library, in a sense, is just a collection of methods available to you. So we have a jQuery library which provides us a function, a jQuery function that looks like this.
[00:01:03] And we can call it like that. Underscore is a library that gives us an object that's an underscore with a bunch of different properties on it. So the syntax for underscore, you'll see an underscore and a dot. And you can just imagine that somewhere in the library it says var_ = some object.
[00:02:13] So you could use underscore, for example, in node it's used a lot. Or if you're doing some hardware stuff as well. Cool.
>> Bianca Gandolfo: And then, you can also look at the annotated source code which is really interesting. You can see like how they actually write underscore and it's all annotated so you could see like how reduce is written here, and, let's see, at the very bottom.
>> Bianca Gandolfo: So that's really handy, if you're getting stuck and you kinda wanna see how it's really working underneath. Yup?
>> Speaker 2: Did you say jQuery only works in the browser?
>> Bianca Gandolfo: Yes.
>> Bianca Gandolfo: If you think about it, jQuery's all about selecting DOM nodes and then manipulating them and then putting them back into the DOM.
[00:03:10] The DOM is lives in the browser. Cool. So we're gonna talk about a couple of underscore methods. How to use them, and then I'm kinda gonna set you use and let you just explore and work with underscore on some exercises.