Skip to content

feat(m4): added solution 011 distinct names #2624

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

EvaLa94
Copy link

@EvaLa94 EvaLa94 commented Jan 10, 2023

No description provided.


// MAIN FUNCTION
// Read all the files from a directory and print all the unique popular names (female and male)
fs.readdir(data, (err, files) => {

Choose a reason for hiding this comment

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

I think it's better to give the function a more meaningful name.
Example: getUniqueNames

);
getNames(object.maleNames).then((names) =>
console.log("Popular male names", names)
);

Choose a reason for hiding this comment

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

Does the function also handle any errors?
I don't see "catch" here and in the function getNames ;-)

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