User Manual
Print

Repeating Actions in Several Times

Repeat times do

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"controls_repeat_ext\" disabled=\"true\" x=\"23\" y=\"67\"><value name=\"TIMES\"><shadow type=\"math_whole_number\" disabled=\"true\"><field name=\"NUM\">4</field></shadow></value></block></xml>"}
				
			

This is used to do some actions in several times.

Parameters: Condition: Number (Default: 4)

Output: N/A
Sample code:

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"pxt-on-start\" x=\"0\" y=\"0\"><statement name=\"HANDLER\"><block type=\"controls_repeat_ext\"><value name=\"TIMES\"><shadow type=\"math_whole_number\"><field name=\"NUM\">4</field></shadow></value><statement name=\"DO\"><block type=\"basic_consoleLogNum\"><value name=\"num\"><shadow type=\"math_number\"><field name=\"NUM\">1</field></shadow></value><next><block type=\"basic_sleep\"><value name=\"ms\"><shadow type=\"math_number\"><field name=\"NUM\">100</field></shadow></value></block></next></block></statement></block></statement></block></xml>"}
				
			

The output:

Repeat Times - Output