WeCodeAcademy

Loops and Functions

Loops

Examplejavascript
Open in editor »

Functions

A function is a reusable block of code.

Examplejavascript
Open in editor »
Quick check

Which keyword sends a value back from a function?

Your turn: write the code

Use a loop to print the numbers 1 to 5 with console.log, one number per line.

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.