Compare commits

...

2 Commits

Author SHA1 Message Date
estlop a4c4dee4a5 docs: Explain what to do when slice is empty or there are no odd elements as per review 2 years ago
estlop 080a12cafe docs: Add description for oddlength 2 years ago
  1. 34
      subjects/oddlength/README.md

34
subjects/oddlength/README.md

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