Skip to content

Commit cf42fb6

Browse files
committed
Remove fill(null)
1 parent 766a8bb commit cf42fb6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

JavaScript/6-pool.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class QueueNode {
55

66
constructor({ size }) {
77
this.size = size;
8-
this.buffer = new Array(size).fill(null);
8+
this.buffer = new Array(size);
99
this.reset();
1010
}
1111

JavaScript/8-circular.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class CircularQueueNode {
55

66
constructor({ size }) {
77
this.size = size;
8-
this.buffer = new Array(size).fill(null);
8+
this.buffer = new Array(size);
99
this.readIndex = 0;
1010
this.writeIndex = 0;
1111
this.next = null;

JavaScript/9-nodiv.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class CircularQueueNode {
55

66
constructor({ size }) {
77
this.size = size;
8-
this.buffer = new Array(size).fill(null);
8+
this.buffer = new Array(size);
99
this.readIndex = 0;
1010
this.writeIndex = 0;
1111
this.next = null;

0 commit comments

Comments
 (0)