Easy
What does the ?. (optional chaining) operator do in JavaScript?
1const userProfile = {2 name: 'John Doe',3 preferences: { theme: 'dark' },4};56const theme = userProfile?.preferences?.theme ?? 'default';7const language = userProfile?.settings?.language ?? 'English';89console.log('Theme:', theme);10console.log('Language:', language);