Browse Source

Merge pull request #933 from uristdwarf/patch-1

has-city: Specify type of paramaters/return values
content-update
MSilva95 2 years ago committed by GitHub
parent
commit
18d1db6e27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      subjects/has-city/README.md

9
subjects/has-city/README.md

@ -2,10 +2,9 @@
### 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 an array of strings, which are cities of that country, which returns a new function. \
of that country and it returns a new function. \ The new function takes a string, called `city`, as a parameter and which determines
The new function takes a city parameter which returns whether the array contains that string or not.
whether a city is part of that country or not.
If it is, it should be returned `<city> is a city from <country>`, otherwise If it does, 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>`.

Loading…
Cancel
Save