[understandinges6]

39 views
Skip to first unread message

wind f

unread,
Feb 19, 2021, 3:35:39 AM2/19/21
to Zakas Books
hi Nicholas C. Zakas:
I am very glad to write to you. I am reading your book《Understanding ES6》recently. I think this is  a very nice book. But I have a problem about the 12 chapter when create a array object by proxy.
I think it may be like this code:
Reflect.set(trapTargat, 'length', Number(key) + 1)
But not this you writed:
Reflect.set(trapTargat, 'length', currentLength + 1)
This is an example to explain the problem:
Normal array:
4.png

5.png
When run your code:
2.png
When run my new code:
3.png
I do not know is there any mistake in your code ?

Best wishes and hope your reply!

wind f

unread,
Feb 19, 2021, 7:31:19 PM2/19/21
to Zakas Books
When I went home yesterday night and read this chapter again. I find that it is my fault to remember mistake content. You are right. I am so sorry about that. Please close or delete this issue.

Nicholas Zakas

unread,
Feb 22, 2021, 1:46:11 PM2/22/21
to zakas...@googlegroups.com
No problem. Thanks for the followup. 

--
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/001861f6-3043-4b66-8367-b259682525c1n%40googlegroups.com.
--

______________________________
Nicholas C. Zakas (@slicknet)
Owner, Human Who Codes LLC
Reply all
Reply to author
Forward
0 new messages