Loops/Foreach: Difference between revisions
→{{header|J}}
(Replace println() with print(); replace output "syntaxhighlight" tag with "pre" tag) |
|||
Line 1,521:
=={{header|J}}==
<syntaxhighlight lang="j">
0
1
2
3
4
5
6
7
8
9</syntaxhighlight>
That said, J's <code>for.</code> provides a "foreach" mechanism.
<syntaxhighlight lang="J"> {{for_i. i. y do. echo i end.}}10
0
1
2
3
4
5
6
7
8
9
</syntaxhighlight>
=={{header|Java}}==
|