https://bjarneo.codes/how-to-create-a-simple-javascript-library-like-jquery/
In this blog post I’ll show you a simple approach to create a JavaScript library that uses the same syntax as jQuery called method chaining. Lets call our library Q.
Example of how we could use Q: Q(‘.class’).hide();
You may think “why the heck would I need to create my own library when we got jQuery”, and the answer is simple. YOU DO NOT NEED TO USE JQUERY FOR EVERYTHING. If you’re eager to learn how JavaScript actually work, and/or you’re creating a small application, use your own code and test it in different browsers / browser versions.