Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion JavaScript/3-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const logable = (fields) =>
constructor(data) {
this.values = data;
for (const key in fields) {
Object.defineProperty(Logable.prototype, key, {
Object.defineProperty(this, key, {
get() {
console.log('Reading key:', key);
return this.values[key];
Expand Down
8 changes: 4 additions & 4 deletions JavaScript/7-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ const a1 = arrayPool();
const b1 = a1.map((x, i) => i).reduce((x, y) => x + y);
console.log(b1);

const a2 = arrays();
const a2 = arrayPool();
const b2 = a2.map((x, i) => i).reduce((x, y) => x + y);
console.log(b2);

arrays(a1);
arrays(a2);
arrayPool(a1);
arrayPool(a2);

const a3 = arrays();
const a3 = arrayPool();
const b3 = a3.map((x, i) => i).reduce((x, y) => x + y);
console.log(b3);

Expand Down