Explanation of snippet

The following snippet is in the Text Blaze Docs:
{dbselect: SELECT Name, Age FROM People; space=3REHoipsxcR9GDKxPBd9oL; name=results; multiple=yes}

People:
{repeat: for person in results} {=person.name} is {=person.age} years old
{endrepeat}

I am trying to understand where the 'person' comes from in the repeat function.

The syntax {repeat: for person in results} means to loop over the results list. For each element in the list, assign the element to a new variable named person and then run the contents of the {repeat} block.

person is a name the author of the example chose when writing it. You can use any name you want, and then it will be available within the {repeat} for each element of the list.

Hope this clarifies things!

Thank you Scott. I didn't realise you could use any name in that scenario. Is this documented anywhere?

Does the new named variable just work within the repeat formula

Found the documentation - variable scoping

Great!