79468911

Date: 2025-02-26 07:59:08
Score: 2
Natty:
Report link

It's as simple as that (no proxy, no lib...):

(((obj.a ??= {}).b ??= {}).c ??= {}).d = value;

I am eventually providing the answer to my own question because after 4 months, neither @VLAZ nor @jcalz have added an answer that I could officially accept. Thanks to both of them for providing me the answer in the question comments 🙏 All credit to them!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): 🙏
  • Has code block (-0.5):
  • User mentioned (1): @VLAZ
  • User mentioned (0): @jcalz
  • Self-answer (0.5):
Posted by: Yann Vo