underscore/docs/content/collections/contains.md
Ruidy d19fa7b8c9
docsite (#19)
* change documentation theme and structure

* add config files

* fix links

* add build doc command

Co-authored-by: Ruidy <rnemausat@newstore.com>
2022-03-23 10:32:56 -04:00

21 lines
289 B
Markdown

---
title: "Contains"
date: 2022-03-21T13:30:29-04:00
---
`Contains` returns true if the value is present in the slice.
```go
package main
import (
"fmt"
u "github.com/rjNemo/underscore"
)
func main() {
nums := []int{1, 3, 5, 7, 9}
fmt.Println(u.Contains(nums, 5)) // true
}
```