bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/JavaScript/JavaScript Foundations
JavaScript•JavaScript Foundations

JavaScript Functions

Functions Study Path

Learn Functions in the Right Order:

First the idea

Then how to make them

Then how to use them

Step 1

Beginner

What are Functions?

Functions are reusable code blocks designed for particular tasks Functions are executed when they are called or invoked

Functions are fundamental in all programming languages

Step 2

Beginner

Calling Functions

Functions are executed when they are called or invoked You call a function by adding parentheses to its name: name()

Step 3

Beginner

Function Parameters

Parameters allow you to send values to a function Parameters are listed in parentheses in the function definition

Step 4

Beginner

Function Return Values

A function can return a value back to the code that called it The return statement is used to return a value from a function

Step 5

Intermediate

Function Arguments

Function parameters and arguments are distinct concepts

Parameters are the names listed in the function definition Arguments are the values received by the function

Step 6

Intermediate

Function Expressions

A function expression is a function stored in a variable The variable name can be used to call the function

Previous

JavaScript Loops

Next

JavaScript Scope