understandinges6

32 views
Skip to first unread message

Alex And

unread,
Jan 4, 2021, 4:24:56 PM1/4/21
to Zakas Books
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(this.name);
}
}
console.log(doSomething.name);
// "doSomethingElse"
console.log(person.sayName.name);
// "sayName"
console.log(person.firstName.name); // "get firstName"



let o = { 
  get foo() {}, 
  set foo(x){}
};
var descriptor = Object.getOwnPropertyDescriptor(o, "foo");
descriptor.get.name; // "get foo"
descriptor.set.name; // "set foo";

Nicholas Zakas

unread,
Jan 11, 2021, 2:09:48 PM1/11/21
to zakas...@googlegroups.com
Thanks, yes, that looks like a mistake.

Would you mind opening an issue here? https://github.com/nzakas/understandinges6/issues/new

That way I can track it better.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Zakas Books" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zakasbooks+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zakasbooks/68c18432-a9da-4bab-9eae-96dd8b45167an%40googlegroups.com.

And Alex

unread,
Jan 11, 2021, 2:43:58 PM1/11/21
to zakas...@googlegroups.com
Ok, I'll do it tomorrow. It's 10 pm now, in my city)

Скачайте Outlook для Android


From: zakas...@googlegroups.com <zakas...@googlegroups.com> on behalf of Nicholas Zakas <nich...@humanwhocodes.com>
Sent: Monday, January 11, 2021 9:09:39 PM
To: zakas...@googlegroups.com <zakas...@googlegroups.com>
Subject: Re: understandinges6
 

Nicholas Zakas

unread,
Jan 12, 2021, 1:49:48 PM1/12/21
to zakas...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages