← BYTES
Go·Starter·Ref: 10.1.10

What keyword is used to declare a function in Go?

Have a question about this video? Mention reference 10.1.10 when you contact us.

a.function
b.def
c.func
d.method
Go uses the func keyword for every function and method declaration, e.g. func add(a, b int) int { return a + b } -- there is no separate def or function keyword as in some other languages.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES10110#Go