JavaScript · Beginner · Ticket 7Ticket #7 · from Priya Raman, Product Manager
  1. Example
  2. Warm-up 1
  3. Warm-up 2
  4. Ticket
Brief
NEW TICKET#7 · Invoice list

“Due in 3 days” on the invoice list

Priya Raman · Product Manager
Opened today

“Freelancers want to see at a glance which invoices need chasing. Next to each one, the list should say how its due date compares with today: Due today, Due tomorrow, Due in 5 days, Overdue by 1 day, Overdue by 3 days. Hannah already wrote daysBetween, which counts the days from one date to another. Can you finish dueLabel?”

YOUR PLAN
  1. 1Watch an example2 min
  2. 2Warm-up 11 min
  3. 3Warm-up 21 min
  4. 4Fix the ticket8 min
BY THE END YOU CAN
  • Choose between several cases with if and else if
  • Put the cases in an order that works
  • Turn a negative number positive with -
About 12 minutes
Four short steps. Nothing is timed, and you can leave any time.