16 lines
294 B
Zig
16 lines
294 B
Zig
|
test "for" {
|
||
|
const string = [_]u8{ 'a', 'b', 'c' };
|
||
|
|
||
|
for (string, 0..) |character, index| {
|
||
|
_ = character;
|
||
|
_ = index;
|
||
|
}
|
||
|
for (string) |character| {
|
||
|
_ = character;
|
||
|
}
|
||
|
for (string, 0..) |_, index| {
|
||
|
_ = index;
|
||
|
}
|
||
|
for (string) |_| {}
|
||
|
}
|