- A library is a JavaScript file that contains a bunch of functions, and those functions accomplish some useful task for your webpage.
- We need libraries to insert code that has already been written so that we donāt waste time writing out the code from scratch.
The Danish computer scientist Bjarne Stroustrup said, āthe standard library saves programmers from having to reinvent the wheelā. Using libraries helps the programmerās efficiency. It saves time and code writing space. It is a marvelous tool to have in the developerās tool box.
Libraries contain commonly used codes that allow developers to save time from repeatedly writing same code for programs.
1. Why do we need libraries?
Libraries are a great tool for developers. The allow us to reuse code that has already been written. This saves both time when writing and reduces the ammount of potential bugs.
We need them to reuse and share code.
- As programmers, we should be able to re-use existing code. A library gives us access to this code so that we donāt have to rewrite code that has already been written.
We should use existing code when we can, so that we donāt waste our time writing code that another programmer has already written.
Libraries are helpful because they prevent us from wasting our time writing code that another programmer has already written.
- Why do we need libraries?
JavaScript libraries are free, reusable collections of JavaScript code made for particular task.
JavaScript libraries are needed for saving time in problem solving and error fixing.
They have educational value too. Just looking at a particular popular code makes you understand problem you are trying to solve.
Why do we need libraries?
To include useful functions, that are already written by others and shared, so we can reuse it.
Liabraries ā Reading Assignment
Why do we need libraries?
-
Some JavaScript libraries are used for easier integration of JavaScript with other web development technologies such as CSS, PHP, Java and Ruby.
-
Libraries are easier means for programmers to develop dynamics interfaces for applications both web-based and desktop-based.
So we can incorporate already existing code instead reinventing the wheelā¦
To reuse code that has already been written by other developers this not only saves times but also helps us to avoid unnecessary bugs. āSharing is caringā.
We need libraries so that we do not have to create and recreate each snippet of code from scratch. It is an admirable feature of the information revolution.
I like all the answers. But I would like a debate on when to start learning libraries? If you start learning libraries sooner you can create more and feel accomplishedā¦in doing so you can also then see more example of code which is vital to learningā¦on the other hand sometimes people jump in to using libraries too soon, use it as a crutch and might not understand all the basicsā¦but as Iāve been learning waiting to completely understand the basics and āunderstandā is different for all of us. I donāt know⦠any thoughts to really how much time one should give to learning vanilla js and doing things in CSS/html ( which is far more complex then it is given credit) when you can just slap a boot strap and jquary library extension on it and call it a good day and to be honest that IS what you will end up doing most of the timeā¦so what are your thoughts on libraries and do they interfere with the learning maturation of a novice coder?
Hello @ivan and community,
- Why do we need libraries?
We need libraries to share code easily each other. Libraries makes it possible to re-use code that was already written for a specific problem. Donāt waste time to create a new wheel, take the one that is already finished.
Cheers
- Why do we need libraries?
To be able to build upon the foundations (code templates) of the coding and not try to build everything from point zero again and rediscover america.
We need libraries because they shorten the amount of time we use to develop a webpage. If a group of functions that you want to have are openly available anyway, you could just reference it in our code. As a side note, libraries encourage sharing of knowledge, ideas, and resources, so thatās a great feature of the computer science field.
They allow us to reuse code made by us or others. In effect, we donāt have to reinvent the wheel when we want to add functionality to our program.