A discardableResult keyword is used before a function signature if we may not be going to be assigning the return value of the function.
@discardableResult
func getAge() -> Int{
return 24
}
getAge()
Search
Aug 28, 20241 min read
A discardableResult keyword is used before a function signature if we may not be going to be assigning the return value of the function.
@discardableResult
func getAge() -> Int{
return 24
}
getAge()