Created
August 16, 2024 23:47
-
-
Save quonic/b5e8be08d48b47a483e8a6ce0355cc14 to your computer and use it in GitHub Desktop.
How to abuse a for loop to reset a value on each iteration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ($($i = 0; $j = 0); $i -lt 3; $($i++; $j = 0)) { | |
# What is $j? | |
Write-Host "$j" | |
$j++ | |
Write-Host "$j" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment