Objects
Object Oriented Programming
Javascript is what is considered an Object Oriented Programming language for the most part. What this means is that every single thing you program has some sort of structure that defines it. In the following blurbs you'll explore what this means for you as you learn to program in JS.
EVERYTHING IS AN OBJECT
So what exactly is an Object? And what does that mean for you while your programming?
Long story short, everything in JS is an object that has a value tied to every property. To visualize this we can go back to our data type of the Array to explain things. In the example below we have an Array of Seven different names for Dwarves. At first glance you would guess that the names are the only thing there, but we can dig a layer deeper and understand that each item in the list is paired with a property. This property being the index/location of the name in the Array.
Just because it isn't visible to us in our code there is hidden properties that we should be aware of EVERYTHING that we program in JS. Which can be a lot so seriously, don't stress about it. Practice makes perfect and as long as you make a habit of programming with JS you will become familiar with the hidden properties that you need to know.
let dwarves = ['Sneezy', 'Sleepy', 'Happy', 'Doc', 'Grumpy', 'Dopey', 'Bashful'];