Skip to content

Solution added#2744

Open
kyrylomanko wants to merge 1 commit intomate-academy:masterfrom
kyrylomanko:develop
Open

Solution added#2744
kyrylomanko wants to merge 1 commit intomate-academy:masterfrom
kyrylomanko:develop

Conversation

@kyrylomanko
Copy link

No description provided.

Copy link

@lerastarynets lerastarynets left a comment

Choose a reason for hiding this comment

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

Great job overall! Left one tiny suggestion for the improvement

str += this[i];
}

if (i !== this.length - 1) {

Choose a reason for hiding this comment

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

Instead of checking if the current iteration is not the last, you can simplify your code by adding the separator after each iteration, and then remove the last separator at the end.

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