Enum with String and Int
enum Group: String {
case Me
case You
case Her
case Him
init?(index: Int) {
switch index {
case 0: self = .Me
case 1: self = .You
case 2: self = .Her
case 3: self = .Him
default: return nil
}
}
}
print(Group(index: 0)?.rawValue) // Optional("Me")
Congratulations @kwakbab! You received a personal award!
Click here to view your Board
Congratulations @kwakbab! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!