I'm trying to accomplish a task which is passing an integer value to enum, and return a specific String for the passed in integrer.
I'm using enum because the integers are known and each of them has a meaning. I have done the following:
enum Genre: String {
case 28 = "Action"
case 12 = "Adventure"
case 16 = "Animation"
case 35 = "Comedy"
case 80 = "Crime"
}
What I'm expecting: when passing one of the cases, I want to return the String association.
Please, if you have a question or need any further into, ask it in the comment.
