Skip to main content
FUNCTIONAL-PROGRAMMING5 MIN READ

Replace the sentinel with Option

Choose Option for expected absence and avoid sentinel values that blur valid and missing data.

A customer record may or may not have a verified phone number. The old function returns a string and uses "N/A" when no phone exists.

Read the full lesson

Sign up free — one personalized lesson every day, matched to your role and goals.

Already have an account? Sign in

← Back to library
Contact us