GoConqr has a new look! Let us know what you think.

Module 1 of 16 · Media

Js Functions

Kostas Diakogiannis

Js Functions

JavaScript functions

Up to now, we write code in our script in such a way that will be executed or run once. Even with the construction of a loop, we define a loop, that runs multiple times but we can't execute this code: 

1. Whenever we want

2. More than once

It seems that functions give us the opportunity to GROUP our code into  a specific block and give a name to this block. Then any time we want this block of code to be executed and run we can just simply call it by it's own name. If we call this block more than once, it will run more than once.

Thus we keep code, organized, grouped by the task it performs, separately from other code, cleaner and reusable.

Let's take a look at how.

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?