🔸property

has a name, a value and 3 attributes.

JSvalueobject ⟩ property

a property has a name, a value, and 3 attributes.

// 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.

Last updated