Search Your Question

What will be output for following code?

 Code: 

enum Test: Int 
{      
    case VeryOld = -1      
    case Old      
    case Current     
    case Future 
 }  
let testEnum = Test.Current  
print("testEnum.rawValue: \(testEnum.rawValue)")  


Output:

testenum.rawvalue: 1

No comments:

Post a Comment

Thanks