Variable declaration reset: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
Line 785:
=={{header|Wren}}==
Note firstly that unassigned variables are impossible in Wren. If a variable is created without giving it an explicit value, then it is assigned the special value 'null' which is the only instance of the Null class and therefore distinct from all other values in the language.
<syntaxhighlight lang="ecmascriptwren">var s = [1, 2, 2, 3, 4, 4, 5]
 
// There is no output as 'prev' is created anew each time
9,476

edits