With interactive demo


Have you heard about the Parking Lot?



Ok, let me explain briefly.

The Parking Lot is challenge where you are asked to write a class that manage an imaginary parking lot. In this tutorial we will do that in JavaScript. And to make it a bit more interesting, we will create a small React app that will visualize the workings of our class.

Let's begin 🎉

Challenge Requirements

You have to implement a class in JavaScript. That class should consist of variables and methods enough to simulate the work of a parking lot. Here are the details:


Let’s take a look first at the class logic itself.

It’s pretty straightforward and I am sure there won’t be any surprises for most of you. Especially if you already have some programming experience. Especially in OOP and class based languages.

class ParkingLot