Loading...
let's explore prototypes, getters, setters, properties, methods & a lill bit discussions on objects

objects are simple but complex at the same time we can make object just by opening a block of Curly Brackets and in which we have two things
these are two main things in objects
Properties in an objects are like a variable that contain data and are Mutable.
Methods are like functions in objects we can define methods and execute them.
There are two ways of accessing object’s propery
In dot notation after writing the object name you can put a dot and then property name.
In bracket notation we can open a square bracket and then write the property name into it.
Now if you need to access the method yo can also simpley do
Objects are building blocks of JS all we know and also that everything is at the end of the day is objects.
yes arrays in javascript are an object because array are mainly formed like that
If you wanted to see console log an array in browser’s console.
yes function are first class objects in javascript
In javascript classes are also the syntactic sugar over objects. Before ES6 classes were not in javascript so for those who came from C++ and Java like background so for them classess were introduced.
Static properties and methods are defined not on the instance of the objects instead we can use them on object itself.
There is a lot more about objects where you can explore topics like
More about Objects
Dot Notation vs Bracket Notation