Skip to main content
Skip table of contents

for

Features

'for' repeats an operation within the specified repeating range.

syntax

for <item> in <sequential object S>:

      <syntax>

Example

PY
x=0
for i in range(0, 3): # i is 0 -> 1 -> 2 
	x= x + 1 

sum = 0
for i in range(0, 10):
	sum = sum + i
tp_log("sum = " + str(sum))
#expected result:
#sum = 45
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.