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
4 changes: 2 additions & 2 deletions JavaScript/1-simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class AccountQuery {
}

class BankAccount {
static collection = new Map();

constructor(name) {
this.name = name;
this.balance = 0;
Expand All @@ -28,8 +30,6 @@ class BankAccount {
}
}

BankAccount.collection = new Map();

const operations = {
Withdraw: command => {
const account = BankAccount.find(command.account);
Expand Down
4 changes: 2 additions & 2 deletions JavaScript/2-scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class AccountQuery {
}

class BankAccount {
static collection = new Map();

constructor(name) {
this.name = name;
this.balance = 0;
Expand All @@ -31,8 +33,6 @@ class BankAccount {
}
}

BankAccount.collection = new Map();

const operations = {
Withdraw: command => {
const account = BankAccount.find(command.account);
Expand Down