// src/App.jsx
function CityList() {
const cities = ["Dublin", "Tokyo", "Vancouver", "Lisbon"];
return (
{cities.map((city) => (
- {city}
))}
);
}
function App() {
return ;
}
export default App;
/*
Notes:
- .map() turns the cities array of strings into an array of
elements, one per city.
- The city name itself is used as the key since the list has no
duplicates and no separate id field — fine for a small, simple,
non-reordered list like this.
*/