JavaScript Functions

Learn about functions in JavaScript.

By the end of this lesson, we’ll be able to do the following:

  • Use the ES6 arrow function syntax.
  • Create default function parameters.

ES6 functions: arrow functions

Arrow functions were introduced in ES6. They provide a simpler syntax for creating functions and more intuitive handling.

Let’s take a look at this example, which uses an ES5 function expression syntax:

Get hands-on with 1200+ tech skills courses.