what’s the difference between Swift functions and Swift methods?
Anoniem
I didn’t know the answer to this question when confronted with it; but after hanging up, I looked up the answer: Apple’s Swift language allows functions that are not inside some class (i.e. so you can write functions that are not tied to any class or object but instead can be used whenever they are needed). Methods, on the other hand, are functions that live within a class.