Declare a class

 Problem

I want to create a new class and create a new instance of it.



 Recipe


// Declare our new class

class myClass {
    
    init() {
        // Called when a new object is created
        print("A new instance was created!")
    }
    
}

// Create a new object of myClass
let c = myClass()
				


 Playground