Skip to content

Commit bf6595d

Browse files
committed
Fix examples
1 parent 85a4d1a commit bf6595d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

JavaScript/3-function.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
const arrayToQueueAdapter = () => {
44
const arr = [];
55
arr.enqueue = data => arr.push(data);
6-
arr.dequeue = () => this.pop();
7-
arr.count = () => this.length;
6+
arr.dequeue = () => arr.pop();
7+
arr.count = () => arr.length;
8+
return arr;
89
};
910

1011
// Usage

JavaScript/6-interface.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ console.dir({
4949
name: dict.has('name'),
5050
city: dict.has('city'),
5151
},
52-
keys: dict.get('name'),
52+
keys: dict.keys(),
5353
});
5454

55-
dict.clear();
55+
//dict.clear();

0 commit comments

Comments
 (0)