Drag the background!

Step 1. Function Basics

Daniel Shiffman of The Coding Train introduces the fundamental concept of a "function" in programming.

One World shows how to make a nice bouncing ball. The other World shows how to separate out that code into separate functions, so not all the code has to be inside the draw() function.

Again, we assume you have done Introduction to Programming: Part One.

Reminder on how to to use these course pages
  • Click video to play. Click World to run.
  • Click "Clone and Edit" to make your own copy of the World and edit it.
  • Use buttons (or back and forward arrow keys) to move through the course.

World

Tutorial 5.1 (0)
Function Basics

World

Tutorial 5.1 (1)
Function Basics
The background is a program, showing the JavaScript graphics used on this site.
The globes light up when you log in.
 
Font:

Users retain ownership of user content.

Platforms      Stats      The name      Terms and conditions

Call for partners      Contact

Call for partners!
Ancient Brain is looking for a partner to co-write a JavaScript coding book for schools, to be used worldwide. This would be a course for students in learning to code from scratch. The book and course will be integrated into the Ancient Brain site. This is an opportunity for someone looking to develop a course and textbook to partner with a site to promote it. Read more.