Static members

Static members are shared between all instances of class.

static keiword defines a static member.

class MyCls{
    static var defaultName = "unknown"      
    
    static func greeting(n: String) {     
        print("Hello \(n)")
    }
}

struct MyStruct{
    static var defaultName = "unknown"      
    
    static func greeting(n: String) {     
        print("Hello \(n)")
    }
}