Please enable JavaScript to use CodeHS

New Jersey Computer Science

Lesson 4.3 Functions and Parameters 3

Description

In this lesson, students continue working with multiple parameters that create graphics as output which is very useful, since creating several different graphical objects involves writing the same code over and over again (set the size, set the color, set the location, etc).


Objective

Students will be able to:

  • Explain the purpose of functions
  • Define their own JavaScript functions
  • Utilize (call) their JavaScript functions to simplify their graphics programs
  • Identify repeated code that can be simplified with functions and parameters
  • Define functions that take in multiple parameters as input, and create graphics as output
  • Pass parameters of the correct number and type to their defined JavaScript functions