Fundamentals3 / 9
Up next

Methods

// a def with typed params and an Int result
def add(a: Int, b: Int): Int = a + b

@main def main(): Unit =
  println(add(2, 3))
What you're solving

a def with typed params and result