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

[API Enhancement] : Replace var with const for Better Code Efficiency #37

Closed
1 task done
Vibgitcode27 opened this issue Oct 8, 2023 · 3 comments · Fixed by #38
Closed
1 task done

[API Enhancement] : Replace var with const for Better Code Efficiency #37

Vibgitcode27 opened this issue Oct 8, 2023 · 3 comments · Fixed by #38
Assignees
Labels
enhancement New feature or request hacktoberfest New label for hacktoberfest-23 wow

Comments

@Vibgitcode27
Copy link
Contributor

Brief Description 🤓

Title:

Replace var with const for Better Code Efficiency

Description:

Issue:

I've observed that in

New_APIs/Demo_CRUD_API'/src/index.js

within this repository, we're using the var keyword for variable declarations. The usage of var can lead to potential hoisting and scope-related issues. With ES6 and beyond, we have better ways to declare variables using let and const.

Suggestion:

Wherever possible and applicable, it would be more efficient to use const (for variables that don't change their value) and let (for variables that do). This would not only make our code more modern but also more predictable in terms of variable scope and lifecycle.

Benefits:

  • Immutability: By using const, we can ensure that the value of a variable doesn't change unexpectedly.
  • Block Scope: Both let and const are block-scoped, which reduces the risk of unintended side effects.
  • Readability: Modern JS practices are becoming standard, and using const and let increases the codebase's readability.

📌 Request for Assignment:

  • I'd like to work on this issue. Please assign it to me.

Select the open source program you are contributing to

hacktoberfest-23, Other

Code of Conduct

@dishamodi0910 dishamodi0910 added enhancement New feature or request hacktoberfest New label for hacktoberfest-23 wow labels Oct 8, 2023
@dishamodi0910
Copy link
Owner

Greetings @Vibgitcode27🎀 ! , We are excited to have you dive into another issue with us!🚀
Your involvement in our project has been invaluable, and we're confident that your skills and insights will help us conquer this challenge😇.

Use command /gdsc to self assign the issue.

This issue represents an exciting opportunity for us to improve and enhance our project, and we are thrilled to have you on board.
We request you to follow CONTRIBUTING GUIDELINES.
Looking for your PR soon!
In case of any issues, you can contact us on Discord.❣️

@Vibgitcode27
Copy link
Contributor Author

/gdsc

@dishamodi0910
Copy link
Owner

Hey @Vibgitcode27 ! I wanted to inform you that we have closed issue.Thank you for your understanding, and we look forward to your continued engagement with our repository🤗.
In case of any issues, you can contact us on Discord.
Thank you! ❣️
Happy Coding! ✨
Will See you soon❣️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest New label for hacktoberfest-23 wow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants