For each element in a variable? What does this mean?

Can someone explain to me what that means?!

Hi Kelly,

Variables are used to store data. In CoBlocks, the type of data stored can be text or numbers or boolean (true/false), and if you have CoSpaces Pro, you can also create and store Lists of things, e.g. a list of planet objects.

Once you have a list of planets you might want to make each one move around the sun. Using a for each element in List allows you to do this, as it puts each list item into the temporary variable, element.

You can change the name of this variable to suit, like I’ve done below, then access it via the Variable value block.

You can see this code in action, and remix the CoSpace below:

I hope this is clear for you. Let me know if you have further questions.

Geoff @ TechLeap