Why does
$i=1
for ($i -le 5; $i++)
{Write-Host $i}
result in an infinite loop? I never tried to write something like this in C# or any other programming language, so I don't know how it will behave there, but why would the for cycle not just grab the "i" variable compare it to 5, add 1 to it and compare it again, it's like the for cycle is blind or some form of a machine, instead of a reasonable, logical human being.
Why infinite and not just grab predefined i? Answers like "because that's how PowerShell functions" are useless, I want to know why it works like that.
I know it becomes infinite, because it's missing the first parameter, I want to know why, though, like the answer the the philosophical "why would the for cycle not look for the variable of the same name outside of its cycle, but must be specifically included in it?"