Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSohail Khan
549 PointsUnderscore.js
What is underscore.js (I think lib like jQuery)? What can it do? Why there is no course on it on treehouse? Is it necessary for javascript developer like other lib (JQuery, Angular)?
1 Answer
Tomas Svojanovsky
26,680 PointsHello, I don't recommend using underscode.js. https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore
Gustavo Winter
Courses Plus Student 27,382 PointsGustavo Winter
Courses Plus Student 27,382 PointsUnderscore is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects.
Check the Underscore page here.
Why you need that?
Like a developer is good to know every tool available. In some cases you can use the flexibility of the Underscore library to improve your code.
Like this example:
--- > object_.object(list, [values]) Converts arrays into objects. Pass either a single list of [key, value] pairs, or a list of keys, and a list of values. If duplicate keys exist, the last value wins.
---> isMatch_.isMatch(object, properties)
Tells you if the keys and values in properties are contained in object.
On my opinion, is a good idea to be familiar with this library since it provides tools to make your job easier. Hope this helps.
P.S: You can check all the tools on the oficial Underscore website here.
If you want to check the diferrence between a library and a framework, please Check Here.