नेट WPM0
WPM0
सटीकता100%
बीता समय0s
समय—
वर्ण0
गलत0
त्रुटियाँ0
प्रगति0%
कैप्स लॉक चालू है
कोड प्रॉम्प्ट मार्गदर्शिका पढ़ें
- प्रोग्रामिंग भाषा
- TypeScript
- कठिनाई
- आसान
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");