Home > AI > Language > Swift >

ExpressibleByNilLiteral

Get a taste.

var integer = 0 // ExpressibleByIntegerLiteral
var string = "Hello!" // ExpressibleByStringLiteral
var array = [0, 1, 2] // ExpressibleByArrayLiteral
var dictionary = ["Key": "Value"] // ExpressibleByDictionaryLiteral
var boolean = true // ExpressibleByBooleanLiteral
var optional: String? = nil // ExpressibleByNilLiteral

Leave a Reply