macOSisthebestOS's user avatar
macOSisthebestOS's user avatar
macOSisthebestOS's user avatar
macOSisthebestOS
  • Member for 9 months
  • Last seen this week
Stats
979
reputation
1k
reached
106
answers
1
question
Loading…
About
import Foundation

struct User {
   let username: String
   let favoriteLanguage: (String, link: URL)
   let leastFavoriteLanguage: String
   let bio: String
   let prefersAppleProducts: Bool,
   let favoriteAppleProducts: [AppleProduct]
}

enum AppleProduct {
   case mac
   case iPhone, iPad
   case watch, tv, homePod, airPods
   case vision
}

let me = User(
   username: "macOSisthebestOS",
   favoriteLanguage: ("Swift", link: URL("www.swift.org")!),
   leastFavoriteLanguage: "JavaScript",
   bio: """
   I golf Swift code, and I dare say I'm pretty good at it.
   I've got a bit of experience with some other languages,
   too, though.
   """,
   prefersAppleProducts: true,
   favoriteAppleProducts: [.mac, .iPhone]
)
This user doesn’t have any gold badges yet.
This user doesn’t have any silver badges yet.
12
bronze badges
75
Score
105
Posts
98
Posts %
20
Score
32
Posts
30
Posts %
18
Score
23
Posts
21
Posts %
9
Score
14
Posts
13
Posts %
8
Score
13
Posts
12
Posts %
8
Score
8
Posts
7
Posts %
Top posts
View all questions and answers
question
10
Mar 27
answer
3
Jul 11, 2023
answer
2
Mar 4
answer
2
Jul 12, 2023
answer
2
Mar 5
answer
2
Jul 13, 2023
answer
2
Feb 29
answer
2
Mar 6