KotlinVararg Parameters in Functions


Syntax

  • Vararg Keyword: vararg is used in a method declaration to indicate that a variable number of parameters will be accepted.
  • Spread Operator: An asterisk (*) before an array that is used in function calls to "unfold" the contents into individual parameters.