An argument is a value that you pass to a function when calling the function. For example, in the call [code]rotate(0.5)[/code], the value [code]0.5[/code] in the parentheses is an argument. A function can receive no arguments, one argument, or multiple arguments. Arguments can be mandatory or optional. When a function takes multiple arguments, you separate the values with commas, like in this function call: [code]jump(50, 100)[/code] When [i]calling[/i] a function, we name the values passed in parentheses [i]arguments[/i]. When writing a function definition, however, we talk about function [i]parameters[/i]. In the following example, the names [code]x[/code] and [code]y[/code] are [i]parameters[/i].
인수는 함수를 호출할 때 함수에 전달하는 값입니다. 예를 들어 [code]rotate(0.5)[/code] 호출에서 괄호 안의 값 [code]0.5[/code]는 인수입니다. 함수는 인수가 없거나 하나 또는 여러 인수를 받을 수 있습니다. 인수는 필수 또는 선택 사항일 수 있습니다. 함수가 여러 인수를 사용하는 경우 다음 함수 호출과 같이 값을 쉼표로 구분합니다. jump(50, 100) 함수를 [i]호출[/i]할 때 괄호 안 [i]인수[/i]에 전달된 값의 이름을 지정합니다. 그러나 함수 정의를 작성할 때 함수 [i]매개변수[/i]에 대해 이야기합니다. 다음 예에서 이름 [code]x[/code] 및 [code]y[/code]는 [i]매개변수[/i]입니다.
A function can receive no arguments, one argument, or multiple arguments. Arguments can be mandatory or optional.
When a function takes multiple arguments, you separate the values with commas, like in this function call: [code]jump(50, 100)[/code]
When [i]calling[/i] a function, we name the values passed in parentheses [i]arguments[/i].
When writing a function definition, however, we talk about function [i]parameters[/i]. In the following example, the names [code]x[/code] and [code]y[/code] are [i]parameters[/i].
함수는 인수가 없거나 하나 또는 여러 인수를 받을 수 있습니다. 인수는 필수 또는 선택 사항일 수 있습니다.
함수가 여러 인수를 사용하는 경우 다음 함수 호출과 같이 값을 쉼표로 구분합니다. jump(50, 100)
함수를 [i]호출[/i]할 때 괄호 안 [i]인수[/i]에 전달된 값의 이름을 지정합니다.
그러나 함수 정의를 작성할 때 함수 [i]매개변수[/i]에 대해 이야기합니다. 다음 예에서 이름 [code]x[/code] 및 [code]y[/code]는 [i]매개변수[/i]입니다.