The closed-dock check now uses .includes(). The report still needs each dock’s name, bikes, and slots together. [0, 14, 6, 0, 11] alone can’t identify Elm Street or its twelve free slots. Carry your Python records across so you can build each report line from a complete dock record.
Write a Dock as an Object
In Python, you’d read the dock’s known keys from a dict:
Language: Python
dock = {"name": "Elm Street", "bikes": 0, "slots": 12}
print(f"{dock['name']} has {dock['bikes']} bikes")
In JavaScript, write the record as an object literal, braces containing named values called properties. console.log() prints its arguments: