zig.guide icon indicating copy to clipboard operation
zig.guide copied to clipboard

Update 30-vectors.mdx

Open bacher opened this issue 5 months ago • 0 comments

https://zig.guide/language-basics/vectors page contains two "vector looping" code snippets, they are almost the same.

The only difference is: The first one has:

const sum = blk: {

the second has

var sum = blk: {

Variant with var considered as error actually, because variable does not change.

So my fix is removing the duplication.

bacher avatar Sep 03 '24 08:09 bacher