0% found this document useful (0 votes)
2 views

docs

The document outlines various command types used in programming, including action commands for directional movements, brush commands for object properties, and loop commands for repetitive tasks. It explains the structure of a for loop and its components: initialization, condition, and increment. Additionally, it briefly mentions math, logic, function, variable, and comments commands for specific operations and tasks.

Uploaded by

dulalchandra314
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

docs

The document outlines various command types used in programming, including action commands for directional movements, brush commands for object properties, and loop commands for repetitive tasks. It explains the structure of a for loop and its components: initialization, condition, and increment. Additionally, it briefly mentions math, logic, function, variable, and comments commands for specific operations and tasks.

Uploaded by

dulalchandra314
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Action command: Action commands are mostly used to carry out certain line

actions or commands, such as moving a line in an upward, downward, forward, or


backward direction to ascertain a direction's degree and precise point.

Brush command: The brush command is used to determine the color, length, and
width of an object. Once again, it is being used to apply the project's sticker.

Loop command: Instead of typing a block of statements again and again, we can
use a for loop around the block of statements. The most common usage of a for
loop is simply to use it as a counting loop to execute a block of code a certain
number of times.

Here is a typical construct for loop used to count from 0 to 3 to execute the block
of code 4 times:

for(var i = 0; i < 4; i++)

initialization var i = 0; is executed once, before anything else. Create an identifier


named i and initialize it to 0.

condition i < 4; is checked before each iteration, to see if the block of statements
should execute or not. If i is less than 4.

increment i++ is executed after every iteration, after the block of statements is
executed. Increase (increment) i by 1.

Math command: To operate mathematical operation between two or more


numbers.

Logic command: To perform logical operation .


Function command: Function commands initialize specific task and command i.e.
to draw a circle, to create a shape with specific shape etc.
Variables command: To modify and manipulate with different type of variables.
Comments command: To write comments

You might also like