Browse Source

docs: Add description for oddlength

DEV-3241-DEV-3242-corewar
estlop 2 years ago committed by Dav Hojt
parent
commit
6468a3614b
  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