Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

nil coalescing swift

var a: Int? = nil

// The right operand will be used if the left operand
// evaluates to nil.
print(a ?? "a is nil") // Prints "a is nil"
 
PREVIOUS NEXT
Tagged: #nil #coalescing #swift
ADD COMMENT
Topic
Name
4+4 =