Blocks language

Blocks snap into each other to make up the program that your Code Connection app will run. Blocks are events (on command, on died, …) or other code that is snapped inside event blocks in order to run.

Event blocks (and the code inside them) are run when the events registered for them occur.

Code that you want to run just once when the program starts goes into the special ||loops:on start|| event block. This block always runs first.

for (let i = 0;i<=5;++i) {}
if (true){}
let x = 0;
x = Math.randomRange(0, 5)
Math.randomRange(0, 5);

Blocks

for (let i = 0;i<5;++i) {}
if (true){}
let x = 0;

Built-in objects

Math.randomRange(0,5);
"".compare("");
[0].push(0);

See Also

logic, loops, variables, math, text, arrays

on-start, javascript blocks, custom blocks