Please enable JavaScript to use CodeHS

AP Computer Science Principles in JavaScript

Lesson 5.1 Functions and Parameters 1

Description

In this lesson, students learn about functions and parameters in the context of JavaScript which builds on their prior knowledge of working with functions in Karel. This lesson focuses specifically on defining and calling functions, and passing simple, single parameters to functions.


Objective

Students will be able to:

  • Explain the purpose of functions
  • Define their own JavaScript functions
  • Utilize (call) their JavaScript functions to solve simple problems
  • Define and call functions that take in parameters as input