If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Unit: Intro to JS: Drawing & Animation

If you're new here, watch our intro video and get a brief tour of our programming course. Then get coding!
Learn how to make programs that draw shapes based on the mouse location, like painting apps.
Learn how to help your peers on their path to learning programming and how to ask for help yourself.
Learn how to use variable expressions to resize parts of your drawing relative to other parts. (This requires a bit more math, so if you don't feel you have a good grasp of fractions yet, you can skip over this.)
How can you figure out what's wrong with your code? Learn tips and tricks for debugging your programs.
Learn how to write JavaScript code that is easy to read and understand, with good use of indentation, spacing, naming, and comments.
Now that you understand the basics of programming, learn techniques that will help you be more productive and write more beautiful code.

About this unit

Learn how to use the JavaScript language and the ProcessingJS library to create fun drawings and animations.