Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

JavaScript Functions Course (How To)

via Treehouse

Overview

JavaScript functions let you create reusable chunks of code. They make programming faster, easier, and less error-prone. They are also one of the essential concepts in JavaScript programming.

Syllabus

Create Reusable Code with Functions

Functions are at the heart of JavaScript. They let you write code that you can quickly use again and again.

Chevron 8 steps
  • Introducing Functions in JavaScript

    4:08

  • Introducing Functions Review

    5 questions

  • Create and Call a Function

    4:57

  • Creating a Function

    3 objectives

  • Return a Value from a Function

    4:32

  • Return a Value from a Function

    3 objectives

  • Using Multiple return Statements

    6:58

  • Function Return Values Review

    5 questions

Pass Information Into Functions

Functions often need specific information to perform a task. In addition to getting information from a function, you can also send information to a function to change how that function works.

Chevron 8 steps
  • Function Parameters and Arguments

    4:48

  • Pass an Argument to a Function

    3 objectives

  • Pass Multiple Arguments to a Function

    4:32

  • Parameters and Arguments Review

    5 questions

  • Create a max() Function

    2 objectives

  • Variable Scope

    7:01

  • Function Declarations vs. Function Expressions

    4:29

  • Scope and Function Expressions Review

    7 questions

Arrow Functions

Learn how arrow functions provide a more concise syntax for writing functions.

Chevron 10 steps
  • Create Functions Using Arrow Syntax

    4:34

  • instruction

    Concise Arrow Function Syntax

  • Arrow Functions Review

    5 questions

  • Default Function Parameters

    5:11

  • Create an Arrow Function

    1 objective

  • instruction

    Descriptive Comments for Functions

  • Function Challenge

    1:24

  • Function Challenge Solution

    4:28

  • Testing for Number Arguments

    4:02

  • JavaScript Functions Review

    6 questions

Taught by

Guil Hernandez

Reviews

Start your review of JavaScript Functions Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.