본문 바로가기
English

Functions

  • A function is a named block of code you can run again and again.
  • function name(params) { ... return value; }. The params are the inputs.
  • return hands a value back to whoever called the function.

area(3, 5) passes w = 3 and h = 5 into function area, which returns 15

교재 자료

로그인 또는 계정 만들기

IGCSE, A-Level & AP