Null
Null is a special value which presents none or nothing.
puts null // nullA variable has no initializer will be assigned by null.
var myVar
puts myVar == nullA function has no return or returns none, will return null.
func fnA() {
return
}
func fnB() {
}
puts fnA() == null // true
puts fnB() == null // trueLast updated
Was this helpful?