Question d’entretien chez Allstate

what’s the difference between Swift functions and Swift methods?

Réponse à la question d'entretien

Utilisateur anonyme

10 avr. 2017

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.