for
foreach
123456<ul>@foreach(var pet in pets) { <li>@pet</li>}</ul>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
123456<ul>@for(var i = 0; i < pets.Length; i++) { <li>@pets[i]</li>}</ul>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
123456<ul>@for(var i = 0; i < pets.Length; i++) { <li>@pets[i] - owned by @owners[i]</li>}</ul>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Below you'll see the source code of the file. Note that we're just showing the main part, and hiding some parts of the file which are not relevant for understanding the essentials. Click to expand the code
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX