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

variable declaration keyword is missing #20

Open
i-amansharma07 opened this issue Apr 27, 2024 · 1 comment
Open

variable declaration keyword is missing #20

i-amansharma07 opened this issue Apr 27, 2024 · 1 comment

Comments

@i-amansharma07
Copy link

i-amansharma07 commented Apr 27, 2024

inside connection.js where we are getting all the list of database let/const/var is missing :

async function listDatabases(client) {
     //here
     databasesList = await client.db().admin().listDatabases();

    console.log("Databases:");
    databasesList.databases.forEach(db => console.log(` - ${db.name}`));
};
@i-amansharma07
Copy link
Author

Benefits ?
By explicitly declaring it with const, code will be more predictable and easier to maintain

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

No branches or pull requests

1 participant