Please enable JavaScript to use CodeHS

AP Computer Science Principles in JavaScript

Functions and Parameters

Students learn how to write reusable code with functions and parameters.

Lessons

5.1 Functions and Parameters 1

  • Functions and Parameters 1
  • Functions and Parameters Quiz 1
  • Double Number
  • Square
  • Triple

5.2 Functions and Parameters 2

  • Functions and Parameters 2
  • Functions and Parameters Quiz 2
  • Sum Function
  • Area of Triangle
  • Height in Meters

5.3 Functions and Parameters 3

  • Functions and Parameters 3
  • Functions and Parameters Quiz 3
  • Draw Circles
  • Horizontal Lines
  • Graphics Stop Light
  • +2 more

5.4 Functions and Return Values 1

  • Functions and Return Values 1
  • Functions and Return Values Quiz
  • Double Number
  • Square with Return Values
  • Quadruple with Return Values

5.5 Functions and Return Values 2

  • Functions and Return Values 2
  • Functions and Return Values Quiz 2
  • Return Values
  • Is It Even?
  • Min

5.6 Local Variables and Scope

  • Local Variables and Scope
  • Local Variables and Scope Quiz
  • Return Values
  • Local Variables

5.7 JavaScript vs Karel

  • JavaScript vs Karel
  • Making Karel's World
  • Making Karel Turn Left
  • Making Karel Turn Right
  • Making Karel Move
  • +3 more

5.8 Basic JavaScript and Graphics Challenges

  • Ghosts
  • Guessing Game
  • Draw Something
  • JavaScript Challenges Badge

5.9 Functions and Parameters Quiz

  • Functions and Parameters Quiz

Courses that include this module