Méthodes Swift

class Person {
  
  // define a method
  func greet() {
    print("Hey there!")
  }
}

var nick = Person()

// call method
nick.greet()
SAMER SAEID