We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c871ad commit 806d98fCopy full SHA for 806d98f
1 file changed
index.js
@@ -1,11 +1,15 @@
1
-class 1ia {
2
- constructor(...arr) {
3
- let arr = [...arr]
4
- }
+class oneArray {
+ constructor(...arr) {
+ this.arr = [...arr];
+ }
5
6
- pos(num) {
7
- this.arr[num - 1]
8
+ pos(num) {
+ return this.arr[num - 1];
9
+
10
+ set(pos, val) {
11
+ this.arr[pos - 1] = val;
12
13
}
14
-module.exports = 1ia
15
+module.exports = oneArray;
0 commit comments