A space to write a description of your code.
Comments are used to describe how your code works so it is easier for humans to understand. It is also a good idea to comment any complex blocks of code so you, or another programmer, can more easily understand the code in the future.
Examples
Example 1
Comments can describe what happens when the code is run or an event happens.
Example 2
Comments can help you track variables and change sprite properties.
Syntax
comment
Parameters
Name | Type | Required? | Description |
---|---|---|---|
text | Click inside the block to type any text |
Tips
- It is a good computer science practice to make comments on your code. They help you and others understand your code. Writing comments can even help you spot bugs.
Found a bug in the documentation? Let us know at support@code.org.