In this tutorial we’re going to build a jQuery-esque library from scratch. We’ll be targeting the latest browsers (IE9+) so we can make use of the some of the features that ECMAScript 5 provides out of the box.

How to Build a DOM Library

Collections & functions

In JavaScript we can store data in arrays and objects, and combinations of those. A common data structure is a collection. A collection is an array of objects, for example:

To show main source of content: