Site menu

CodeCook.io

  • Languages
    • C
    • C++
    • CSS
    • Git
    • HTML
    • Java
    • JavaScript
    • jQuery
    • PHP
    • Python
    • Ruby
    • Scala
  • basic
  • default
  • function

Scala - Function default parameter

Default function parameter when not passing all arguments to function.

0
446
  • Share on Facebook
  • Share on Google+
  • Share on Twitter
def {{function_name}}({{parameter_name}} = {{default_value}}): Unit = {
    {{body}}
}
java

Notes

last update: Oct. 27, 2014

Advertisement

This project is hosted on DigitalOcean, try it and support us

Related concept

  • For each loop
  • Single comment
  • Function
  • Apply function to list

Other language

  • Java
  • Python
  • JavaScript
  • MATLAB
  • Javascript ES6

Random task

  • Pluralize word depending on variable
  • Create queryset from object list
  • Increment counter atomic
  • Get DOM element data attribute
  • Do loop while a condition is true
  • Blog
  • About
  • License