Contains
Contains
returns true if the value is present in the slice.
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
}
Contains
returns true if the value is present in the slice.
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
}