Browse Source

has-city: Specify type of paramaters/return values

Also some grammar fixes.
content-update
Urmas Rist 2 years ago committed by GitHub
parent
commit
8a2005e930
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      subjects/has-city/README.md

10
subjects/has-city/README.md

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

Loading…
Cancel
Save