ความเร็วสุทธิ0
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");