initialise

This commit is contained in:
Javier-Orestis MANTZIOS
2025-01-07 10:39:37 +02:00
commit 108f50e8ea
25 changed files with 5534 additions and 0 deletions

17
test/main.go Normal file
View File

@@ -0,0 +1,17 @@
package main
import "fmt"
func main() {
// Initialize the variable before the loop
value := 0
for i := 0; i < 5; i++ {
// Change its value within the loop
value += i
fmt.Println("Current Value:", value) // Use the variable here
}
fmt.Println("Final Value:", value) // Still accessible after the loop
}