79651318

Date: 2025-06-03 13:20:17
Score: 2.5
Natty:
Report link

You should use optional chaining https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining

const value = obj.foo?.[key]?. || false;
Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: miiimooo