79435907

Date: 2025-02-13 11:00:40
Score: 1
Natty:
Report link

Go fixed that error.

Fixing For Loops.

Go Version <=go1.21

for i := range whatever {
    defer func() { fmt.Print(i) }()
}

Outputs: 44444

Go Version >=go1.22

for i := range whatever {
    defer func() { fmt.Print(i) }()
}

Outputs: 43210

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ilya_dt