From 4c3d5e3b0e039d378da579c2d05e8aff5241f13a Mon Sep 17 00:00:00 2001 From: Ashish Vaghela Date: Mon, 3 Jun 2024 12:30:13 +0530 Subject: [PATCH] Mentioned that other data types can be used to index objects --- files/en-us/web/javascript/data_structures/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/en-us/web/javascript/data_structures/index.md b/files/en-us/web/javascript/data_structures/index.md index 8a4886e71980a1d..a976397c37343a5 100644 --- a/files/en-us/web/javascript/data_structures/index.md +++ b/files/en-us/web/javascript/data_structures/index.md @@ -155,7 +155,8 @@ In computer science, an object is a value in memory which is possibly referenced ### Properties -In JavaScript, objects can be seen as a collection of properties. With the [object literal syntax](/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#object_literals), a limited set of properties are initialized; then properties can be added and removed. Object properties are equivalent to key-value pairs. Property keys are either [strings](#string_type) or [symbols](#symbol_type). Property values can be values of any type, including other objects, which enables building complex data structures. +In JavaScript, objects can be seen as a collection of properties. With the [object literal syntax](/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#object_literals), a limited set of properties are initialized; then properties can be added and removed. Object properties are equivalent to key-value pairs. Property keys in JavaScript objects can be [strings](#string_type), [symbols](#symbol_type), [numbers](#number_type), or even [objects](#object_type) themselves, allowing for a wide range of data types to be used as keys for indexing objects. + Property values can be values of any type, including other objects, which enables building complex data structures. There are two types of object properties: The [_data_ property](#data_property) and the [_accessor_ property](#accessor_property). Each property has corresponding _attributes_. Each attribute is accessed internally by the JavaScript engine, but you can set them through {{jsxref("Object.defineProperty()")}}, or read them through {{jsxref("Object.getOwnPropertyDescriptor()")}}. You can read more about the various nuances on the {{jsxref("Object.defineProperty()")}} page.