Day-5.2 Function review

So Eun Ahn·2021년 1월 7일
0

JavaScript

목록 보기
7/26

no matter what type of function I use they will recieve date, transform date and output data!!

function structure

function name

function name

parameters

parameters: recieves input values (placeholders), local variables

function body

function body: block of code that we want to reuse. processes the function's input data

return

return: will exit/excuted immidiately(terminate!)
calling function

arguments

Arguments: actual values of function parameters input data

variable

variable:to save returned value(function output)

function을 하나로 합칠수도 있으나
according to don't repeat yourself principle(dry code)에 따라서 만약에 한 variation을 바꿔야 할때 모든곳에서 다 찾아서 바꾸는 것이 아닌 한 섹션에서만 찾아 바꾸면 되는 편리함을 위해서.

profile
오늘도 새로운 도전을 한다

0개의 댓글