Strange behaviour of 'let'

I was surprised to see that it is possible to write:

for i = 0…4 {
let k = i
print( k )
}
with an evolving value of k although it is a constant.
Then I realised that the scope of k was delimited by the braces {}

I checked this assumption by writing the following code without compiler complaint:

if true {
let k = 15
}
if true {
let k = 33
}

Good job on figuring that out, Ruben! That’s what programming is all about!