feat: add for.zig

This commit is contained in:
2022-08-27 19:21:42 +08:00
parent c3fc9e9188
commit 8ac2e1f002

8
for.zig Normal file
View File

@@ -0,0 +1,8 @@
const print = @import("std").debug.print;
pub fn main() void {
const string = [_]u8{ 'a', 'b', 'c' };
for (string) |character, index| {
print("{} - {}\n", .{index, character});
}
}