December 19, 2022
Estimated Post Reading Time ~

About Javascript Objects in brief

What exactly are objects? 
→ Objects are generally some real world entities!, but in javascript, objects are key value pairs that contain information about certain things.

Why to use objects? 
-> Any entity which has multiple attributes, or properties can be declared through an object. 
-> A single variable can contain many values 
-> Ease of access with similar properties stored in a singe variable.

How to declare objects in Javascript?


If you want to learn about objects with even better code snippets, you can check the repository I am building for beginners! (star for future reference)

github.com
GitHub - 36atharva/Dealing-with-Javascript: This repository contains all the codes, concepts and...
This repository contains all the codes, concepts and practical implementation of Javascript concepts that you need to understand! - GitHub - 36atharva/Dealing-with-Javascript: This repository conta...


→ We usually declare objects with the const keyword, as we don't want to change the attributes of a certain entity ahead.
→ We access the property of the objects with the dot (.) operator




→ We also use the 'this' keyword in JS to refer to a specific value. 
→ a new way to declare objects is with new() operator




By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.