๐ธproperty
has a name, a value and 3 attributes.
Last updated
Was this helpful?
has a name, a value and 3 attributes.
Last updated
Was this helpful?
Was this helpful?
JS โฉ value โฉ object โฉ property
a property has a name, a value, and 3 attributes.
there are two types of properties๏ผ
(function property) stores a function (method/getter/setter/).
// defining/creating properties
{ name: value } // object literal
obj.prop = value // create property 'on the fly'
// accessing properties
obj . prop // `prop` must be an identifier
obj [ prop ] // `prop` convereted to String or it's a Symbol.
accessing properties
- safely access object's properties.
properties
creating properties
/
features of a property
- writable, enumerable, configurable.