In simple words objects is the collection of name-value pairs. Objects is JavaScript are same as dictionaries in Python , hashtable in c and c++ and hashmap in Java.
The "name" part is a JavaScript string, while the value can be any JavaScript value
There are two ways of creating the object
1 - using object literal (more convenient)
2 - using new keyword
π
A simple example
Top comments (4)
There's also
Object.fromEntries
andObject.create
yeah there is but idea of this post to just get an idea what are objects
sure i will add them in future
Next time talk about class is js
sure