Skip to content

Solution#2736

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

Solution#2736
patrykyo20 wants to merge 1 commit intomate-academy:masterfrom
patrykyo20:develop

Conversation

@patrykyo20
Copy link

No description provided.

Comment on lines +10 to +13
if (separator === undefined) {
// eslint-disable-next-line no-param-reassign
separator = ',';
}

Choose a reason for hiding this comment

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

you don't need to mutate argument of function. You can just set default value for the separator

Suggested change
if (separator === undefined) {
// eslint-disable-next-line no-param-reassign
separator = ',';
}

@@ -5,7 +5,24 @@
*/
function applyCustomJoin() {
[].__proto__.join2 = function(separator) {

Choose a reason for hiding this comment

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

Suggested change
[].__proto__.join2 = function(separator) {
[].__proto__.join2 = function(separator = ',') {

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.

3 participants