hands-on lab

Working with JavaScript Functions

Difficulty: Advanced
Duration: Up to 40 minutes
Students: 850
Rating: 3.7/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

In this lab, you will be working with JavaScript functions. A function is a block of code designed to perform a specific coding task.

In this lab, you will write function declarations and expressions. Each function will have you use console.log() to display the resulting value.

Learning Objectives

Upon completion of this lab, you will be able to:

  • Write Function Declarations
  • Write Function Expressions
  • Understand Arguments and Parameters
  • Invoke Functions

Intended Audience

  • Beginners learning front-end development
  • Software Engineers who need to learn front-end technologies to expand their skillset

Prerequisites

The following courses/courses and labs can ensure your success:

Covered topics

Lab steps

Introduction to JavaScript Labs
Write a function declaration
Call function with arguments
Write a function expression
Call a function expression with an argument
Write an arrow function
Call an arrow function with an argument