course content

Course Content

Introduction to JavaScript

What is function?What is function?

Functions are certain objects that receive values, perform operations and then return values.

The most significant advantage of a function is its ability to be used multiple times.

Look at the function example:

The meeting function is written on 8 lines and contains a block of code on 6 lines. You can see that it is called thrice and executes 18 in total 18 lines of code in total.

It can be called 100 times instead of repeating 600 lines via Copy+Paste.

Note

The above example is only for superficial acquaintance with the functions, it is not necessary to carefully analyze it.

Section 6.

Chapter 1