Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Lesson 22: Functions

Reusable blocks of code that take inputs and return outputs.

What you'll learn

  • declare with function name(params) { ... }
  • return sends a value back (default is undefined)
  • parameters are local to the function
  • functions are first-class — pass them around like values

Example

See examples/.

Exercise

Write max3(a, b, c) returning the largest.