Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
30 lines (20 loc) · 726 Bytes

File metadata and controls

30 lines (20 loc) · 726 Bytes
Copy raw file
Download raw file
Outline
Edit and raw actions

Function

A function is some amount of code you can reuse in your program. You create a function using a function definition which names the function and has its code. A function call is when you use a function by its name somewhere in your program.

Defining a function

A function definition is a block that has the name of the function and its code.

function doSomething() {
}

Calling a function

A function call is when you want to use the code in the function at some place in your program.

function doSomething() {
}
doSomething();

#specific

See also

define, call

Morty Proxy This is a proxified and sanitized view of the page, visit original site.