It’s riddled with awful parts, was put together in 10 days, and now we have to suffer for the next 20 years (it turns 20 in a few months). However, it’s also the duct tape of the internet, and it works just about anywhere that there is a browser. It’s also perhaps the most misunderstood language.
I walk through many of the basic parts, but also go into commonly used patterns, and even show you how to add many of the features found in an object oriented language (private and public functions), but once you understand how prototypes work, you realize that it’s way more powerful than what’s in an OOP language.
It’s entirely too much work to keep formatting it in the page below, so I’ve just copy + paste from OneNote, but you can download it in the link above and it’s much easier to read. Some fellow evangelists and I are also looking into converting it to markdown and posting it on GitHub, so that others can contribute and we can have more detailed examples.
I’ll continue to update it. Open to all criticisms too, so fire away.
My peer, Brian Sherwin, has re-written is all in Markdown on Github, so that we can continue to add new samples and examples.