-
Notifications
You must be signed in to change notification settings - Fork 1
while
Nat! edited this page Mar 1, 2023
·
3 revisions
while
...
endwhile
Until the expression expr
evaluates to NO, zero or nil the code block after the while statement
until the endwhile
statements keeps getting executed.
{# render an old skool HTML table with while #}
<table>
<tr><th>TimeZone</th></tr>
{% rover = [[NSTimeZone knownTimeZoneNames] objectEnumerator] %}
{% while item = [rover nextObject] %}
<tr><td>{{ item }}</td></tr>
{% endwhile %}
</table>
Output:
<table>
<tr><th>TimeZone</th></tr>
</table>