Renamed 'scripts' directory to 'examples'
Also allowed assignment within conditionals
This commit is contained in:
+3
-4
@@ -29,10 +29,9 @@ fn makeCounter() {
|
||||
|
||||
var tally = makeCounter();
|
||||
|
||||
while (true) {
|
||||
var result = tally();
|
||||
|
||||
print result; //prints 1 to 10
|
||||
var result = 0;
|
||||
while (result = tally()) {
|
||||
print result;
|
||||
|
||||
if (result >= 10) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user