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