Skip to content

Commit 090d5db

Browse files
committed
Add empty lines for readability
1 parent f67eb2c commit 090d5db

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

JavaScript/1-object.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
const p1 = {
44
x: 10,
55
y: 20,
6+
67
move(x, y) {
78
this.x += x;
89
this.y += y;
910
},
11+
1012
toString() {
1113
return `[${this.x}, ${this.y}]`;
1214
},

JavaScript/e-array.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,20 @@ class Person {
1313
get name() {
1414
return this[0];
1515
}
16+
1617
get birth() {
1718
return this[1];
1819
}
20+
1921
get city() {
2022
return this[2];
2123
}
24+
2225
get age() {
2326
const difference = new Date() - new Date(this.birth);
2427
return Math.floor(difference / 31536000000);
2528
}
29+
2630
toString() {
2731
return this.name + ' age is ' + this.age;
2832
}

0 commit comments

Comments
 (0)