ನಿವ್ವಳ WPM0
WPM0
ನಿಖರತೆ100%
ಕಳೆದ ಸಮಯ0s
ಸಮಯ—
ಅಕ್ಷರಗಳು0
ತಪ್ಪು0
ದೋಷಗಳು0
ಪ್ರಗತಿ0%
Caps Lock ಆನ್ ಆಗಿದೆ

ಕೋಡ್ ಪಠ್ಯದ ಮಾರ್ಗದರ್ಶಿ ಓದಿ

ಪ್ರೋಗ್ರಾಮಿಂಗ್ ಭಾಷೆ
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");