“Inisialisasi SWIFT SWIFT” Kode Jawaban

Inisialisasi SWIFT SWIFT

struct Person {
  
  var name = ""
}
SAMER SAEID

Inisialisasi SWIFT SWIFT

struct Person {

  // define two properties  
  var name: String
  var age: Int
}

// object of Person with memberwise initializer  
var person1 = Person(name: "Dwight", age: 43)

print("Name:", person1.name)
print("Age:", person1.age)
SAMER SAEID

Jawaban yang mirip dengan “Inisialisasi SWIFT SWIFT”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya