JS Associative Arrays - Exercise .03
Здравейте при тази задача 03. Piccolo от Associative Arrays ми минават само zero тестовете,а останалите не ,чудех се доста къде може да е проблема, но немога да се сетя къде точно греша.Това е моят код към задачата : https://pastebin.com/5cPBNEEQ
Това е условието на задачата
Write function that:
- Records a car number for every car that enters the parking lot
- Removes a car number when the car goes out
- Input will be array of strings in format [direction, carNumber]
Print the output with all car numbers which are in the parking lot sorted in ascending by number
If parking lot is empty , print: "Parking Lot is Empty"
Examples
Input |
Output |
['IN, CA2844AA', 'IN, CA1234TA', 'OUT, CA2844AA', 'IN, CA9999TT', 'IN, CA2866HI', 'OUT, CA1234TA', 'IN, CA2844AA', 'OUT, CA2866HI', 'IN, CA9876HH', 'IN, CA2822UU'] |
CA2822UU CA2844AA CA9876HH CA9999TT |
['IN, CA2844AA', 'IN, CA1234TA', 'OUT, CA2844AA', 'OUT, CA1234TA'] |
Parking Lot is Empty |