Browse Source

docs(sliceRemove): fixed subject

- added one more output example
- fixed missing space
pull/1526/head
jrosendo 2 years ago committed by José Rosendo
parent
commit
a28ac1ea50
  1. 4
      subjects/sliceremove/README.md

4
subjects/sliceremove/README.md

@ -3,6 +3,7 @@
### Instructions
Write a function that takes a slice of integers and an `int` as arguments, if the given `int` exists in the slice then remove it, otherwise return the slice.
- If the slice is empty, return the slice itself.
### Expected function
@ -29,6 +30,8 @@ import (
func main() {
fmt.Println(piscine.SliceRemove([]int{1, 2, 3}, 2))
fmt.Println(piscine.SliceRemove([]int{4, 3}, 4))
fmt.Println(piscine.SliceRemove([]int{}, 1))
}
```
@ -38,4 +41,5 @@ And its output:
$ go run .
[1 3]
[3]
[]
```

Loading…
Cancel
Save