Compare commits

...

3 Commits

Author SHA1 Message Date
estlop 124d3ad576 docs: Explain what to do when slice is empty or there are no even elements as per review 2 years ago
estlop 63f648c8d9 docs: fix wrong syntax on usage 2 years ago
estlop 158ca1e7c0 docs: Add readme file for evenlength subject 2 years ago
  1. 33
      subjects/evenlength/README.md

33
subjects/evenlength/README.md

@ -0,0 +1,33 @@
## evenlength
### Instructions
Write a function that receives a slice of strings and returns a new slice with the strings in which the length is even. When the slice is empty or there are no even strings return an empty slice.
### Expected function
```go
func EvenLength(strings []string) []string {
}
```
### Usage
Here is a possible program to test your function:
```go
package main
import "fmt"
func main() {
fmt.Println(EvenLength([]string{"Hi", "Hola", "Ola", "Ciao", "Salut", "Hallo"}))
}
```
And its output:
```console
$ go run .
[Hi Hola Ciao]
```
Loading…
Cancel
Save