If you find yourself writing lengthy defensive checks like if (data && data.user && data.user.profile) just to safely access a deeply nested property, stop! Modern JavaScript introduced Optional Chaining (?.) specifically for this scenario. Now you can write data?.user?.profile?.name. If any part of that chain is null or undefined, the expression simply evaluates to undefined instead of throwing a massive runtime error. Itβs cleaner, safer, and makes your data access logic much more readable immediately.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)