본문 바로가기

Front-end/Javacript

Calling a Function

a function declaration does not ask the code inside the function body to run, it just declares the existence of the function. The code inside a function body runs, or executes, only when the function is called.

To call a function in your code, you type the function name followed by parentheses.

This function call executes the function body, or all of the statements between the curly braces in the function declaration.

We can call the same function as many times as needed.

Let’s practice calling functions in our code.

'Front-end > Javacript' 카테고리의 다른 글

Return  (0) 2021.07.14
Parameters and Arguments  (0) 2021.07.12
flat() 사용법  (0) 2021.07.02
localeCompare()란?  (0) 2021.07.01
sort() 란?  (0) 2021.07.01