Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

50.15.1Iterating over a vector’s items

Here is a version of the vector using string slices:

Couldn't automatically determine type of variable `fruits`.
Please give it an explicit type.

We loop on the vector’s elements using a vector’s reference:

The vector still contains its elements: