NEW TICKET#4 · Invoices
Invoice numbers your accountant can read
Lena Fischer · Finance & Ops
Opened today
“Our accountant wants invoice numbers she can read at a glance: a short code for the client, a dash, then that client's invoice count with four digits. Acme Studio's 42nd invoice should be ACME-0042. The code is the first four letters of the client's name in capitals, and only the letters A to Z count, so spaces, digits and symbols are skipped. Can you write invoiceNumber?”
YOUR PLAN
- 1Watch an example2 min
- 2Warm-up 11 min
- 3Warm-up 21 min
- 4Fix the ticket11 min
BY THE END YOU CAN
- Loop over the characters of a string
- Check whether a character is a letter
- Pad a number with
padStart