0

Assigning a variable using optional chaining? asked the question about setting properties in a manner similar to optional chaining, e.g., foo?.bar?.baz?.quux = 'quux' .

I'd like to ask more specifically if there is a proposal in the works to implement this (I didn't see one at https://github.com/tc39/proposals ), and if not, whether this was due to the original proposal rejecting the idea out of hand for some reason or another.

Brett Zamir
  • 14,034
  • 6
  • 54
  • 77
  • 1
    Does this answer your question? https://stackoverflow.com/questions/58878948/optional-chaining-on-the-left-side-in-javascript – Unmitigated Sep 12 '20 at 02:44
  • Check out [this proposal](https://github.com/tc39/proposal-optional-chaining). – Unmitigated Sep 12 '20 at 02:44
  • 1
    Discussion about this can be found [here](https://github.com/tc39/proposal-optional-chaining/issues/18) - Daniel Ehrenberg says "We also discussed this question at TC39, and the committee did not seem so interested in adding this feature." – Nick Parsons Sep 12 '20 at 02:55
  • Thanks, I somehow missed that issue and that other question. I've voted to close the issue as a dupe---not sure if it is better etiquette to delete it? My question is a little more explicit in asking for that which may be helpful but the answer is there... – Brett Zamir Sep 12 '20 at 06:11
  • Nevermind, I hadn't seen the question to me. Should know better, but I guess this hasn't come up before, or if it did, I forgot. :-) – Brett Zamir Sep 12 '20 at 06:12
  • 1
    @BrettZamir yeah, don't delete this question even though its a duplicate. It can serve as a "sign-post" which future readers might stumble upon when searching a similar question. – Nick Parsons Sep 12 '20 at 15:12

0 Answers0