So what is a third-party library,
that's of course very important to understand.
We're working with Javascript and by the way for the concept of third-party libraries, it absolutely
does not matter if you're working with Javascript in the browser or with Node.js which would allow
you to write server side applications with Javascript.
Actually the programming language doesn't even matter because that idea of having third-party libraries
does not just exist in Javascript world,
it's available for any programming language out there because the idea is the following; you are writing
code for your application, that's your job as a developer.
Now when writing this code, there are certain problems you have to solve. In this dummy application here,
we're building a two array function which combines two numbers into an array
but then let's say we also want to get the difference between this array and some other array, which
I hardcoded in there.
Now that's just one example of course but it's typical for tasks or for problems you will face as
a developer. You're working on some project and for that, you need to write a lot of code.
Now some of that code is really specific to that project, really specific to the business logic behind
that project
but other functionalities which you might need as part of this project might be more like this type of
problem here,
you might need some utility function because maybe as part of the business logic of your project, you
need to get the difference between two arrays,
let's say two lists of customers but the comparison itself of the two arrays,
that's a problem that's not specific to your project,
that's a utility function you have to write and therefore you have to spend time and energy on a task
which is not directly related to your project,
now that's where third-party libraries come in. Third-party libraries are essentially packages of code,
typically packages of functions written in Javascript which have all that logic in them
so that you can just reach out to these predefined, prewritten functions and functionalities and use
them in your project.
So third-party libraries are really all about adding utility functions of different complexities, can
be very simple, very trivial utility functions or more complex functionalities which you want to add, that
doesn't really matter.
The idea is that third-party libraries can help you have an easier life as a developer because they
take away some of the complexity which is not directly related to your core project, to your core business
logic which you still might need.
So let's have a look at some examples.