educative.io

https://www.educative.io/courses/decode-the-coding-interview-go/g2PlQRjm0V6

Line 41
The “find()” function. Where is that defined?

Thanks

Varun


Type your question above this line.

Course: https://www.educative.io/collection/10370001/6112523134173184
Lesson: https://www.educative.io/collection/page/10370001/6112523134173184/4633445768101888

Hi @Varun_Verma1

Here’s the definition of the find function:

func find(str []string, query string) bool{
    for _, s := range str {
        if s == query {
            return true
        }
    }
    return false
}
1 Like