✅ JS Solution || Faster Than 93% || Understandable & Simple
Runtime: 157 ms, faster than 74.06% of JavaScript online submissions for Design Parking System.\nMemory Usage: 49.8 MB, less than 45.44% of JavaScript online su
**Runtime: 157 ms, faster than 74.06% of JavaScript online submissions for Design Parking System.\nMemory Usage: 49.8 MB, less than 45.44% of JavaScript online submissions for Design Parking System.**\n\n```\nvar ParkingSystem = function(big, medium, small) {\n    this.big = big;\n    this.med = medium;\n    this.small = small;\n};\n\nParkingSystem.prototype.addCar = function(carType) {\n    if (carType==1) {\n        if (this.big>0) {\n            this.big--\n            return true\n        }\n    }\n    else if (carType==2) {\n        if (this.med>0) {\n            this.med--\n            return true\n        }\n    }\n    else if (carType==3) {\n        if (this.small>0) {\n            this.small--\n            return true\n        }\n    }\n    return false\n};\n```
['JavaScript']