Step into Swift logo

What is the difference between a method and a function?

Method vs Function

Method vs Function

Method:

Function that is associated with a class, struct, enum. Both instance and type methods. (Inside)

Function:

Declared in global score and does not belong to ANY TYPE. (Outside)


< All Posts