Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use constants when variable values do not change #28

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

Merged
merged 1 commit into from
Jan 5, 2017

Conversation

tonytran1
Copy link
Contributor

@tonytran1 tonytran1 commented Jan 5, 2017

(ES6) When you declare a constant, the variable should stay the same throughout the program.

@ryanmcdermott ryanmcdermott merged commit 55e612d into ryanmcdermott:master Jan 5, 2017
@ryanmcdermott
Copy link
Owner

This is a good addition, I think we may want to expand this in the future to talk about how to handle globals properly. Avoid them as much as you can, unless you have a definitions file or something along those lines. I don't remember a section on that within Clean Code. Definitely something to look for and think over. Thanks!

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