Is a library that provides more than a 100 utility methods, without extending any built-in objects. its very helpful library in case you want to test your code or also useful if you want to be more productive
First I’ll require the library in my code, in order to use the functions
Let’s see now some examples of this awesome library, but before that, I would like to give you some arrays and objects which is the material you see and use in the examples
Takes each item from the array or object and loops through it and allow you to do whatever you want with the value
We can iterate from an object too…
This is very pretty because, looks through each value in the list, and it finds the 1st value that passes the truth test. and once it finds stop there and doesn’t traverse the entire list.
This function turns any array-like list into an array. This can come in handy because once your list is in an array you are able to use array functions to filter it down if needed.
This is very useful, because returns the key names of an object
Instead of reinventing the wheel, I’m still using this a lot! this random tool allows the user to return a number that is random, in this case between 0–5000!
This is great! because it will leave off the first value in the array.
So far so good, however, I will leave you two key point resources to learn in your time underscore.js once you already see already the improvement to brings to your daily code
In my next chapter I’ll talk more about libraries, Did you enjoy this? Give it a clap on the left so others can discover it as well or follow me if you are interested in more chapter like this.