Please enable JavaScript to use CodeHS

California Computer Science

Lesson 3.5 The Start Function

Description

In this lesson, students will deepen their understanding of functions by learning about the start function. The start function helps to organize the readability of code by creating a designated place where code that is going to be run in a program can be stored:

function start(){
   turnRight();
}

function turnRight(){
   turnLeft();
   turnLeft();
   turnLeft();
}

Objective

Students will be able to:

  • Explain the functionality of the start function
  • Use the start function appropriately in their programs
  • Improve the readability of their code