A function is a combination of commands related to each other to achieve a specific result. It can take arguments and return a result. If a function does not return a result, it is usually called a procedure. Examples:
function drawLine(x1, y1, x2, y2):
function <number> add(a, b):
return a + b
, . , , drawLine , .
( "-" ) , /. , Window open close, , .
- , - / getter/setter ( . , private field + get/set.).