[BREAKING CHANGE] change variable keyword to 'let' from 'var'

This commit is contained in:
Lukáš Hozda
2017-10-02 08:46:35 +02:00
parent 87b68b79f8
commit 660fbe2e39
7 changed files with 18 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
var x = [1, 2, 3];
let x = [1, 2, 3];
print(x[1]);
x[1] = 5;
print(x[1]);

View File

@@ -1,2 +1,2 @@
var x = 78
let x = 78
print(x)

View File

@@ -1,5 +1,5 @@
var a = true;
let a = true;
if (a) {
var x = 56;
let x = 56;
print(x);
}

View File

@@ -1,4 +1,4 @@
var x = 1000000;
let x = 1000000;
while x > 0 {
x = x - 1;
}

View File

@@ -1,4 +1,4 @@
var x = 10;
let x = 10;
while x > 0 {
print(x);