Nil Coalescing Operators with Swift (Episode 29)

Published: May 26, 2016, 4:21 a.m.

b"In this Swift video tutorial, we'll talk about nil coalescing operators. This operator, defined by two question marks ( ?? ), allows you to quickly set a variable equal to a default value if another variable is nil. For example, let someVar = varThatMightBeNil ?? defaultAmount"