Lava Example - 49
Prompt
Never mind- our campuses aren't happy that Avondale is getting all the attention. Let's update the template so that they're shown in a random order each time the template runs.
Initial Code
<ul>
{% for campus in Campuses %}
<li>
{{ campus.Name }} Campus
</li>
{% endfor %}
</ul>
Solution Lava
{% assign randomCampuses = Campuses | Shuffle %}
<ul>
{% for campus in randomCampuses %}
<li>
{{ campus.Name }} Campus
</li>
{% endfor %}
</ul>