How to build your own JavaScript library!




In this tutorial I go over a super simple way to make your own library that is really similar to jQuery. I hope you like it! Please subscribe if you found this helpful!

Original source


19 responses to “How to build your own JavaScript library!”

  1. Thanks for this tutorial.
    I have a question, in jquery if we write console.log($('.anything')) it will return the DOM element of any html tag has class name (anything). here in your video you did it with 2 steps which is name of the function and then you called the object name to get the elements. so how we can do it like jquery 1 step??!!

  2. i hate this this is not working this is like the worst and all videos like this do not work so stop making them stop it
    help me pls here is my code
    function _(selector){
    var self = {};
    self.selector = selector;
    self.element = document.querySelector(self.selector);

    self.html = function()
    {

    return self.element;
    }

    return self;
    }

Leave a Reply