Mastering the Arcane Art of JavaScript-Mancy for C# Developers: On Summoning Servants and Critters, Or The Basics of Objects in JavaScript
The Mastering the Arcane Art of JavaScript-mancy series are my humble attempt at bringing my love for JavaScript to all other C# developers that haven’t yet discovered how awesome this language and its whole ecosystem are. These articles are excerpts of the super duper awesome JavaScript-Mancy book a compendium of all things JavaScript for C# developers.
The Very Basics of Objects in JavaScript
Hello JavaScriptmancer! It is time to get an introduction to the basics of objects in JavaScript. In this article you’ll learn the beauty of the object initializer and the nice improvements ES6 brings to objects. If you think that you already know this stuff, think twice! There are more than one surprise in this article and I promise that you’ll learn something new by the end of it.
Let’s get started! We’ll start by concentrating our efforts in the humble object initializer to provide some foundation that we can use later when we come to object-oriented programming in JavaScript and prototypical inheritance.
Objects it is!