Skip to content

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