Browse Source

docs: Add description for oddlength

1274-oddlength
estlop 2 years ago
parent
commit
080a12cafe
  1. 38
      subjects/oddlength/README.md

38
subjects/oddlength/README.md

@ -0,0 +1,38 @@
## 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.
### Expected function
```go
func Oddlength(strings []string) []string {
}
```
### Usage
Here is a possible program to test your function:
```go
package main
import (
"piscine"
"fmt"
)
func main() {
l := piscine.Oddlength(["Hi", "Hola", "Ola", "Ciao", "Salut", "Hallo"])
fmt.Println(l)
}
```
And its output:
```console
$ go run .
[Ola Salut Hallo]
```
Loading…
Cancel
Save