# Optional Parameters and Default Values in TypeScript In TypeScript, a function parameter can be optional and can also have a default value. ## Example from your code ```ts function buildWeeklyDownloadPeriods( dateRange?: DownloadDateRange, now = new Date(), ): string[] { // ... } ``` ## What this means - `dateRange?`: - The `?` means this argument is optional. - The caller can omit it. - `now = new Date()`: - If caller does not pass `now`, TypeScript uses `new Date()`. ## Python comparison ```py def build_weekly_download_periods(date_range=None, now=None): if now is None: now = datetime.now() ``` TypeScript default parameters are cleaner because the default is declared directly in the signature.