有返回值

函数

get_sum <- function(n1, n2) {
  # The last value is the result
  n1 + n2
}

result <- get_sum(5, 3)
# result = 8

cat("result =", result, "\n")