Jump to content

Loops/Foreach: Difference between revisions

Line 1,413:
 
 
=={{header|Langurlangur}}==
A for in loop iterates over values and a for of loop iterates over indices.
<lang Langurlangur>for .i in [1, 2, 3] {
writeln .i
}
 
forval .iabc in= "abc" {
 
for .i in .abc {
writeln .i
}
 
for .i inof ".abc" {
writeln .abc[.i]
}
 
for .i in .abc {
writeln cp2s .i
}</lang>
Line 1,430 ⟶ 1,437:
2
3
97
98
99
97
98
Line 1,436 ⟶ 1,446:
b
c</pre>
 
 
=={{header|Lasso}}==
1,007

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.