We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48f92b0 commit 302fc12Copy full SHA for 302fc12
JavaScript/3-function.js
@@ -1,11 +1,11 @@
1
'use strict';
2
3
const arrayToQueueAdapter = () => {
4
- const arr = [];
5
- arr.enqueue = (data) => arr.push(data);
6
- arr.dequeue = () => arr.pop();
7
- arr.count = () => arr.length;
8
- return arr;
+ const array = [];
+ array.enqueue = (data) => array.push(data);
+ array.dequeue = () => array.pop();
+ array.count = () => array.length;
+ return array;
9
};
10
11
// Usage
0 commit comments