Welcome to the Tutorial Site!



Functions!

Functions are a very basic JavaScript block of code created to perform a task. When this block of code is "called" it is executed. Functions can take parameters (), which can be used as local variables within the code block. Functions are useful because they allow us to execute code when something happens, like as the result of an if/else statement. With the return statement, we compute a value for the function, which is returned back to whatever called the function, and the function will stop running. Functions are great because they can be reused multiple times.

                functions addTheseNumbers(x, y) {
                var x = 7;
                var y = 8;
                    console.log(x + y);
                }
                

Here's a helpful link!