![]() What are some of the methods used for working with array? filter: Looks through each value in the list, returning an array of all the values that pass a truth test (predicate).find: Looks through each value in the list, returning the first one that passes a truth test (predicate), or undefined if no value passes the test. ![]() What are some of the methods used for working with collections? Of course, you can use Underscore for back-end development if you are using Node. ![]() The compressed download of Underscore is only about 4kb (I heard). If bandwidth is not a concern, or if you've figure out a way to store the Underscore code onto the mobile device, go ahead and use Underscore. If you just need a couple of method from Underscore, you can implement those methods yourself. Underscore provides a lot of methods that you may find useful from time to time, but if you are in an environment where bandwidth is limited (mobile), and if there is no way to store Underscore permantly onto the mobile device, and you really want to reduce the bandwidth, you may want to see if the other libraries that you currently use already provide whatever functionality that you need from Underscore. If your front-end code is simple (just DOM manipulation), then perhaps you do not need to use Underscore. Underscore provides over 100 functions that support both your favorite workaday functional helpers such as map, filter, invoke, as well as more specialized goodies such as function binding, javascript templating, creating quick indexes, deep equality testing, and so on. Underscore is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects. In other words, Underscore has methods for almost everything, including template. ![]() Underscore has methods for working with collections, arrays, functions, objects, and a number of utility methods. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |