Javascript — Objects
Objects are collections of key-value pairs that model real-world entities. Keys (properties) are strings, and values can be any type, including functions (called methods). Objects enable encapsulating data and behavior, a core part of JavaScript's flexibility.
let person = {
name: "Charlie",
age: 30,
greet: function() { console.log("Hi!"); }
};
console.log(person.name);
person.greet();