JS Functions

JavaScript Functions: A Beginner's Guide

You have seen quite a lot of JavaScript already, and now you are ready for one of the most powerful features of the language: functions.

Soon you will see that you have actually been using built-in functions already. But now, it is time to learn how to start writing your own!

Why Use Functions?

Functions are an incredible building block that will drastically reduce the amount of code you need to write in your app.


A New Way of Thinking

Writing your own functions does require you to think differently about the structure of your code. This abstraction can be hard to grasp, especially in the beginning.

However, do not worry! Once you have got the hang of this new way of thinking, functions will really help you to write nicely structured, reusable, and low-maintenance code.

Let's dive into this new abstraction layer!


What You Will Learn in This Section

In the upcoming chapters, we will cover the following essential topics to turn you into a JavaScript function master:

Get ready to level up your JavaScript skills!


Exercise

?

What is one of the main benefits of using functions in JavaScript?