𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗢𝗯𝗷𝗲𝗰𝘁𝘀: 𝗕𝗮𝘀𝗶𝗰𝘀 𝘁𝗼 𝗖𝗥𝗨𝗗

JavaScript objects group related data and functions together. Instead of using separate variables, you use key-value pairs.

Think of an entity like a student. An object represents this entity in your code.

Every object has three parts:

How to create objects:

  1. Object Literal This is the most common way. You use curly braces to define the object directly. It is short and easy to read. let student = { name: "Saravanan", age: 25 };

  2. Object Constructor You use the new keyword to build an object. let student = new Object(); student.name = "Saravanan";

Most developers prefer the literal method.

CRUD Operations:

You perform four basic tasks with object data:

Advanced Concepts:

Summary of an object structure:

Source: https://dev.to/dev_saravanan_journey/javascript-objects-from-basics-to-crud-operations-46bg