Netto WPM0
WPM0
Nauwkeurigheid100%
Verstreken0s
Tijd—
Tekens0
Onjuist0
Fouten0
Vooruitgang0%
Caps Lock aan
Lees de codepromptgids
- Programmeertaal
- TypeScript
- Moeilijkheidsgraad
- Makkelijk
Add parameter and return types to a function.
function formatPrice(
amount: number,
currency: string
): string {
return `${currency} ${amount.toFixed(2)}`;
}
const total = formatPrice(24.5, "USD");