Skip to content

Commit de61beb

Browse files
Changed let to const
Got the proper usage of const.
1 parent a70e036 commit de61beb

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/data/examples/en/00_Structure/06_Functions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ function draw() {
1919
}
2020

2121
function drawTarget(xloc, yloc, size, num) {
22-
let grayvalues = 255 / num;
23-
let steps = size / num;
22+
const grayvalues = 255 / num;
23+
const steps = size / num;
2424
for (let i = 0; i < num; i++) {
2525
fill(i * grayvalues);
2626
ellipse(xloc, yloc, size - i * steps, size - i * steps);

src/data/examples/en/00_Structure/07_Recursion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function draw() {
1616
}
1717

1818
function drawCircle(x, radius, level) {
19-
let tt = (126 * level) / 4.0;
19+
const tt = (126 * level) / 4.0;
2020
fill(tt);
2121
ellipse(x, height / 2, radius * 2, radius * 2);
2222
if (level > 1) {

src/data/examples/es/00_Structure/06_Functions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ function draw() {
1919
}
2020

2121
function drawTarget(xloc, yloc, size, num) {
22-
grayvalues = 255 / num;
23-
steps = size / num;
24-
for (i = 0; i < num; i++) {
22+
const grayvalues = 255 / num;
23+
const steps = size / num;
24+
for (let i = 0; i < num; i++) {
2525
fill(i * grayvalues);
2626
ellipse(xloc, yloc, size - i * steps, size - i * steps);
2727
}

src/data/examples/es/00_Structure/07_Recursion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function draw() {
1616
}
1717

1818
function drawCircle(x, radius, level) {
19-
let tt = (126 * level) / 4.0;
19+
const tt = (126 * level) / 4.0;
2020
fill(tt);
2121
ellipse(x, height / 2, radius * 2, radius * 2);
2222
if (level > 1) {

src/data/examples/zh-Hans/00_Structure/06_Functions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ function draw() {
1717
}
1818

1919
function drawTarget(xloc, yloc, size, num) {
20-
let grayvalues = 255 / num;
21-
let steps = size / num;
20+
const grayvalues = 255 / num;
21+
const steps = size / num;
2222
for (let i = 0; i < num; i++) {
2323
fill(i * grayvalues);
2424
ellipse(xloc, yloc, size - i * steps, size - i * steps);

0 commit comments

Comments
 (0)