Re:V8 release v7.2
by earthboundkid on Tuesday December 18, 2018 @02:51PM
(#18709889)
What if I have private values I want to access programmatically? Ie. fields = ['#foo', '#baz', '#bar']; fields.forEach(field => { this[field] = frobnicate(field) }); ?
[ Parent
| on HN ]
I don't know what the spec's solution for that would be, but what you've typed would not work. Specifically because when I say `this.#foo` it is not a property on the object named "#foo". It is just the syntax for looking up a private field referenced by the literal #foo.