Hi, Nicholas!
May be I found a mistake in this chapter "Special Cases of the name Property".
Last line of code types in console 'undefined'. In order to know getter's ot setter's name I found decision in MDN.
Get well! Your books are awesome.
var doSomething = function doSomethingElse() {
// empty
};
var person = {
get firstName() {
return "Nicholas"
},
sayName: function() {
}
}
console.log(doSomething.name);
// "doSomethingElse"
// "sayName"
let o = {
get foo() {},
set foo(x){}
};
var descriptor = Object.getOwnPropertyDescriptor(o, "foo");