|
|
@ -2,10 +2,10 @@ |
|
|
|
|
|
|
|
|
|
|
|
### Instructions |
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
|
|
Create a function `hasCity` that takes a country and an array of cities |
|
|
|
Create a function `hasCity` that takes a string called `country` and a array of strings named `cities`, |
|
|
|
of that country and it returns a new function. \ |
|
|
|
which contains the cities of that country and it returns a new function. \ |
|
|
|
The new function takes a city parameter which returns |
|
|
|
The new function takes a string called `city` as a parameter which returns |
|
|
|
whether a city is part of that country or not. |
|
|
|
whether the string is part of the `cities` array or not. |
|
|
|
|
|
|
|
|
|
|
|
If it is, it should be returned `<city> is a city from <country>`, otherwise |
|
|
|
If it is, it should return the string `<city> is a city from <country>`, otherwise |
|
|
|
`<city> is not a city from <country>`. |
|
|
|
`<city> is not a city from <country>`. |
|
|
|