A function is a reusable piece of code that performs some logic and gives you a result
The return keyword allows the function to give the result of its computation.
return keyword can only be used inside a function.
A parameter is a variable that a function receives.
Most functions will use that variable they receive and will compute the result based on it.
To call a function, you have to start with its name, then opening parentheses (, then the value you want to give to the parameter, and then a closing parenthesis ).
약수의 개수와 덧셈 js (1) | 2024.08.19 |
---|---|
filter (0) | 2024.08.18 |
variable (0) | 2024.08.18 |
삼항 연산자 사용 법 (0) | 2024.08.17 |
내적 js 코딩테스트 자바스크립트 (0) | 2024.08.16 |