mirror of
https://codeberg.org/ziglings/exercises.git
synced 2025-06-08 10:07:01 +09:00
chore: Update comments in 015_for.zig file
This commit is contained in:
parent
e8f09190d6
commit
2b107e8e11
1 changed files with 5 additions and 5 deletions
|
@ -5,6 +5,10 @@
|
||||||
// for (items) |item| {
|
// for (items) |item| {
|
||||||
//
|
//
|
||||||
// // Do something with item
|
// // Do something with item
|
||||||
|
// // item does not have to be declared. The type of item is determined by
|
||||||
|
// // the type of the element in the array.
|
||||||
|
// // item is a variable that is equal to the particular element of the array items
|
||||||
|
// // that the loop is currently on.
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
|
@ -23,9 +27,5 @@ pub fn main() void {
|
||||||
|
|
||||||
std.debug.print("The End.\n", .{});
|
std.debug.print("The End.\n", .{});
|
||||||
}
|
}
|
||||||
// Note that 'for' loops also work on things called "slices"
|
// Note that 'for' loops also work on things called "slices" and "iterators",
|
||||||
// which we'll see later.
|
// which we'll see later.
|
||||||
//
|
|
||||||
// Also note that 'for' loops have recently become more flexible
|
|
||||||
// and powerful (two years after this exercise was written).
|
|
||||||
// More about that in a moment.
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue