hisoka Posted March 11, 2015 Share Posted March 11, 2015 JavaScript library I could not quite understand the term "library" . What is a library ? is there a simple and easy definition for the word library ? Link to comment Share on other sites More sharing options...
justsomeguy Posted March 11, 2015 Share Posted March 11, 2015 jQuery is a library. It is a collection of code written to make certain tasks easier. Link to comment Share on other sites More sharing options...
hisoka Posted March 11, 2015 Author Share Posted March 11, 2015 "It is a collection of code written to make certain tasks easier". So predefined functions , like apply() or eval() or charCodeAt() , are libraries as they are little piece of code written and used to make certain task easier??? like calculating or encapsulation of data . This is useful for human beings . Is not it ? Link to comment Share on other sites More sharing options...
justsomeguy Posted March 11, 2015 Share Posted March 11, 2015 I wouldn't refer to predefined functions as necessarily being a library, they are part of the core language. Libraries are typically third-party collections that you import and use. 1 Link to comment Share on other sites More sharing options...
hisoka Posted March 11, 2015 Author Share Posted March 11, 2015 (edited) according to what you wrote , a library is a code written to make certain tasks easier . This code is typically a third-party code that is imported and used . A normal written script in a website can be imported and used too by million of people to make certain tasks easier . A program which is a code can be downloaded from a third party and used to make certain task easier. So I do not see any difference between a code , a library and a program . So what is a library? Edited March 11, 2015 by hisoka Link to comment Share on other sites More sharing options...
justsomeguy Posted March 11, 2015 Share Posted March 11, 2015 Some libraries might be considered programs, but libraries don't "do" things by themselves. If you put jQuery on a page nothing will happen other than a lot of things getting defined. The page itself will not change, not until you actually use the library in your own code.I don't use the term "a code", or "codes", I use code as plural, e.g. "a file full of code". If I'm referring to a program I call it a program, not "a code". I might refer to "a piece of code" as part of a larger program. A normal written script in a website can be imported and used too by million of people to make certain tasks easierNot the way a library can. You don't need to change libraries. If you take a script off of someone else's site you'll need to change it to work on your site. When you import and use jQuery you don't change jQuery, you just use it. 1 Link to comment Share on other sites More sharing options...
hisoka Posted March 11, 2015 Author Share Posted March 11, 2015 we cannot change a library . A library can be used or implemented in a piece of code or in a program so that we fulfill a desired task Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now