Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Initializing With Raw Values4:52 with Pasan Premaratne
With raw values, since an enum contains a default value before creation, we can use this in an initializer method to return an enum case given an arbitrary value of the same type. That sounds vague, so let’s just check it out in code!