Object Operations
Basic Operations
obj = {x: 1, y: 2}
// Accessing properties
val1 = obj.x // Using dot notation
val2 = obj["x"] // Using bracket notation
// Modifying properties
obj.x = 10 // Using dot notation
obj["x"] = 10 // Using bracket notationObject Methods
// Getting object information
keys = obj.getKeys() // Returns array of keys
values = obj.getValues() // Returns array of values
// Checking for properties
exists = obj.contains("x") // Returns true/falseObject Merging
Using Self Reference
Computed Properties
Important Notes
Last updated