Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add : javascript code snippet inn array manipulation categories #42

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

Closed
JaberChowdhury wants to merge 3 commits into quicksnip-dev:main from JaberChowdhury:main
Closed

Conversation

Copy link

@JaberChowdhury JaberChowdhury commented Dec 30, 2024

Copy link

netlify bot commented Dec 30, 2024
edited
Loading

Deploy Preview for quicksnip ready!

Name Link
🔨 Latest commit 4e9f5bf
🔍 Latest deploy log https://app.netlify.com/sites/quicksnip/deploys/6772e5529a0eb600082514eb
😎 Deploy Preview https://deploy-preview-42--quicksnip.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@Mathys-Gasnier Mathys-Gasnier Dec 30, 2024

Choose a reason for hiding this comment

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

Any reason for the updates ? If not rollback them please

" arr.forEach((item) => {",
" counts[item] = (counts[item] || 0) + 1;",
" });",
" const duplicates = {};",
Copy link
Collaborator

@Mathys-Gasnier Mathys-Gasnier Dec 30, 2024

Choose a reason for hiding this comment

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

You could replace the duplicates part with a simple filter over the object

Object.fromEntries(
 counts.entries().filter(([key, value]) => value > 1)
)

It makes the code easier to understand at a glance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@Mathys-Gasnier Mathys-Gasnier Mathys-Gasnier requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /