Browse Source

Update 04_arrays.zig

array index was off by 1.
tim bangma 4 years ago
parent
commit
0788198de3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      exercises/04_arrays.zig

+ 2 - 2
exercises/04_arrays.zig

@@ -11,11 +11,11 @@
 //
 // Get values of an array using array[index] notation:
 //
-//     const bar = foo[3]; // 5423
+//     const bar = foo[2]; // 5423
 //
 // Set values of an array using array[index] notation:
 //
-//     foo[3] = 16;
+//     foo[2] = 16;
 //
 // Get the length of an array using the len property:
 //