Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #2736

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Solution #2736

wants to merge 1 commit into from

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