Skip to content

Alistair Henshaw#57

Open
Alistair1080 wants to merge 6 commits into
boolean-uk:mainfrom
Alistair1080:main
Open

Alistair Henshaw#57
Alistair1080 wants to merge 6 commits into
boolean-uk:mainfrom
Alistair1080:main

Conversation

@Alistair1080

Copy link
Copy Markdown

No description provided.

Comment thread index.js
Comment on lines +11 to +16
date(date) {
if (typeof date !== "string") {
throw "date must be a string"
}
this.#date = date
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like this function is ever used outside of tests. Is it necessary? The function name isn't very descriptive, it's not clear what it does from the name alone

Comment thread index.js
return this.#date
}
get loggedIn() {
return this.#loggedIn

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to name booleans like it's answering a yes / no question, e.g. isLoggedIn or hasSomething

Comment thread index.js
this.#transactions = search.transactions
}
deposit(amount) {
if (this.#loggedIn === false) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!this.#loggedIn)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants