How to make our own JavaScript library | SoloLearn: Learn to code for FREE!

+15

How to make our own JavaScript library

Help me

11/20/2020 8:29:59 AM

Achiever

2 Answers

New Answer

+9

First you have to know abt functions and why we use library While writing js.. On bigger projects we see some repetations of code unnecessary... To overcome that we use functions... Like everytime we write document.querySelector(xyz) Instead we can make a function like function $(query) { return document.querySelector(query) } And eyery time we can say $(xyz) Instead of typing whole Now we need to do this all the time What if we put this function and deploy it somewhere like github Then we can import all this using a link Bingo... Youve created tour first lib https://youtu.be/24GF5MVEEjE You can watch this vid to know more and have a practical example..

+8

https://youtu.be/4zzbNac6f6Q