With interactive demo

Have you heard about the Parking Lot?

Yes?

No?

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:

Solution

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