You-Dont-Know-JS
You-Dont-Know-JS copied to clipboard
this & prototypes, chapter 5 #Setting & Shadowing Properties
If the
myObject
object already has a normal data accessor property calledfoo
directly present on it, the assignment is as simple as changing the value of the existing property.
and
- If a normal data accessor (see Chapter 3) property named
foo
is found anywhere higher on the[[Prototype]]
chain, and it's not marked as read-only (writable:false
) then a new property calledfoo
is added directly tomyObject
, resulting in a shadowed property.
Is there really has data accessor property? I think threre are only have data properties and accessor properties. And in Chapter 3, I can't find any accurate definition about data accessor property.
Have you ever say
For accessor-descriptors, the
value
andwritable
characteristics of the descriptor are moot and ignored
Why not change "data accessor property" to "data property"?
@getify It is the second edition be available as an update for the kindle version? or it will be a different book?
different book.