Skip to content

Commit 806d98f

Browse files
committed
fixes
1 parent 4c871ad commit 806d98f

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

index.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
class 1ia {
2-
constructor(...arr) {
3-
let arr = [...arr]
4-
}
1+
class oneArray {
2+
constructor(...arr) {
3+
this.arr = [...arr];
4+
}
55

6-
pos(num) {
7-
this.arr[num - 1]
8-
}
6+
pos(num) {
7+
return this.arr[num - 1];
8+
}
9+
10+
set(pos, val) {
11+
this.arr[pos - 1] = val;
12+
}
913
}
1014

11-
module.exports = 1ia
15+
module.exports = oneArray;

0 commit comments

Comments
 (0)