Talk:Variable declaration reset: Difference between revisions

(→‎Meaning of purpose: new section)
Line 6:
 
::Yeah, that would be(/have been) fine too. I also realised far too late that I should have asked for the values instead of the indexes, so we'd get consistent results across 0-based and 1-based indexes... Nevermind. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 13:27, 17 April 2022 (UTC)
 
== Meaning of purpose ==
 
I am having trouble understanding the meaning of the purpose of the task:
 
<blockquote>The purpose is to determine whether variable declaration (in block scope) resets the contents on every iteration.</blockquote>
 
Is there a language where a variable declaration inside the body of a loop does *not* reset the contents on every iteration? What would the alternative be like? --[[User:Spoon!|Spoon!]] ([[User talk:Spoon!|talk]]) 07:17, 21 June 2022 (UTC)
Anonymous user