[nim/en] Clarify Nim zero value for uninitialized variables (#4573)

This commit is contained in:
Glenn Lewis 2024-05-13 03:13:58 -04:00 committed by GitHub
parent f6f88843aa
commit 9e75ad79c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -188,7 +188,7 @@ echo "I'm thinking of a number between 41 and 43. Guess which!"
let number: int = 42
var
raw_guess: string
guess: int
guess: int # Variables in Nim are always initialized with a zero value
while guess != number:
raw_guess = readLine(stdin)
if raw_guess == "": continue # Skip this iteration