mirror of
https://codeberg.org/ziglings/exercises.git
synced 2024-12-26 17:36:29 +00:00
11 lines
411 B
Diff
11 lines
411 B
Diff
--- exercises/062_loop_expressions.zig 2023-10-03 22:15:22.125574535 +0200
|
|
+++ answers/062_loop_expressions.zig 2023-10-05 20:04:07.122768129 +0200
|
|
@@ -47,7 +47,7 @@
|
|
// return it from the for loop.
|
|
const current_lang: ?[]const u8 = for (langs) |lang| {
|
|
if (lang.len == 3) break lang;
|
|
- };
|
|
+ } else null;
|
|
|
|
if (current_lang) |cl| {
|
|
print("Current language: {s}\n", .{cl});
|