Skip to content

complete the tusk#2742

Open
Annbpiu wants to merge 2 commits intomate-academy:masterfrom
Annbpiu:develop
Open

complete the tusk#2742
Annbpiu wants to merge 2 commits intomate-academy:masterfrom
Annbpiu:develop

Conversation

@Annbpiu
Copy link

@Annbpiu Annbpiu commented Aug 20, 2023

task*)

Copy link

@VitaliyBondarenko1982 VitaliyBondarenko1982 left a comment

Choose a reason for hiding this comment

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

Let's simplify solution

Comment on lines 8 to 16
if (this.length === 0) {
return '';
}

let finalSeparator = separator;

if (separator === undefined) {
finalSeparator = ',';
}

Choose a reason for hiding this comment

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

Suggested change
if (this.length === 0) {
return '';
}
let finalSeparator = separator;
if (separator === undefined) {
finalSeparator = ',';
}

looks like redundant.
instead to check separator on undefined set ',' as default argument.

Copy link

@VitaliyBondarenko1982 VitaliyBondarenko1982 left a comment

Choose a reason for hiding this comment

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

.

Copy link

@VitaliyBondarenko1982 VitaliyBondarenko1982 left a comment

Choose a reason for hiding this comment

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

GJ!

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