Skip to content

Conversation

@MasterGuyver
Copy link

No description provided.

Copy link

@romanV7 romanV7 left a comment

Choose a reason for hiding this comment

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

You are writing unnecessary lines of code!

const m = i => a[i];
const push = obj => a.push(obj);
const pop = () => a.pop();
Object.assign(m, { push, pop });
Copy link

Choose a reason for hiding this comment

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

try to write like that
return Object.assign(m, { push, pop })

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