Loops/Continue: Difference between revisions
Content deleted Content added
Add Jsish |
|||
Line 1,093: | Line 1,093: | ||
<lang jq>reduce range(1;11) as $i |
<lang jq>reduce range(1;11) as $i |
||
(""; . + "\($i)" + (if $i % 5 == 0 then "\n" else ", " end))</lang> |
(""; . + "\($i)" + (if $i % 5 == 0 then "\n" else ", " end))</lang> |
||
=={{header|Jsish}}== |
|||
<lang javascript>/* Loop/continue in jsish */ |
|||
for (var i = 1; i <= 10; i++) { |
|||
printf("%d", i); |
|||
if (i % 5 == 0) { |
|||
printf("\n"); |
|||
continue; |
|||
} |
|||
printf(", "); |
|||
}</lang> |
|||
{{out}} |
|||
<pre>prompt$ jsish loop-continue.jsi |
|||
1, 2, 3, 4, 5 |
|||
6, 7, 8, 9, 10</pre> |
|||
=={{header|Julia}}== |
=={{header|Julia}}== |