Optional Parameters
Mark parameters as optional with the ? modifier.
Basic Optional Parameters
Optional vs Default
Optional Must Come Last
Checking Optional Values
Optional Object Properties
Optional with Destructuring
Exercise: Optional Parameter
Add an optional prefix parameter:
Up next · Lesson 12 of 34
Function Overloads
1 min read
11 of 34 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

