Skip to content

Project exam · JavaScript Programming (language in depth)

Project exam: a cab-booking app

Project examintermediate· about 1.25 hours· 6 steps· 75 min · pass 60%

The brief

In 75 minutes, write the JavaScript core of ChaloCab: fares from a rate table, surge pricing by the hour in India, reading a booking from a text message, driver statistics with Map, finding the first driver who accepts with Promise.any and a timeout, and a wallet class with private fields.

Why it matters

Ride-hailing apps in India run on exactly these pieces, and timed JavaScript rounds at product companies ask for them: lookup tables, dates and time zones, regular expressions, Map, promise combinators and classes. Passing this exam shows you can use the language, not just recognise it.

Skills you practise

  • lookup tables and Math
  • time zones
  • regular expressions with named groups
  • Map and sorting
  • Promise.any, Promise.race and timeouts
  • classes with private fields

What you will have at the end

cabs.js: the tested core of a cab-booking app, written in 75 minutes.

How it is marked (rubric, 100 points)
Tasks passedPoints for each checked task; 60% or more passes the exam.60
Correct edge casesBoundaries of the surge hours, bad input, timeouts and refused payments handled.15
Good JavaScriptLookup tables, named groups, Map, promise combinators and private fields used well.15
ReadableClear names and small functions.10
  • 6tasks
  • 75 mintime limit
  • 60%to pass

Rules: a project exam

  • The exam opens full screen. Stay on this page until you hand it in.
  • Opening another tab or app, or leaving full screen, counts as one time away. After 3 times the exam ends.
  • No copy or paste during the exam.
  • No hints and no answers. You can run your code, but the checks run only when you hand in.
  • Every task is checked automatically when you hand in, or when the time is up.
  • You see which tasks passed at the end. You can take it again.
Not yet, go back