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?
⟩ ⟩ ⟩ property
a property has a , a , and 3 .
there are two types of properties:
(data property) stores a value that is not a .
(function property) stores a (method/getter/setter/).
accessing properties
optional chaining (?., ?.[]) - safely access object's properties.
delete properties
features of a property
attribute - writable, enumerable, configurable.
Every property in JavaScript can be classified by 3 factors:
/
own / inherited (from the )
property testing (📘 )
the of a property always creates/sets a property in the original object, it never modifies objects in the .
these properies can't be deleted
global let / const are not properies of the global object
closure can be used as a function with private propery (functions/variables)( closure: manage grades)
object's configurable properies can be deleted
replit:
YDKJS: Scope & Closures (v.2) > Ch. 3:
⟩ ⟩
- method/getter/setter are all functions.