I do, for real constants that are static values. Consider this example:
const BASE_URL = 'http://example.com'; const url = `${BASE_URL}/hello`;
Since url isn't a true constant (it uses another variable to determine its value), I keep it lowercase.
url
Also, I only use constant case at the top level scope, or when I'm importing constants from another file.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I do, for real constants that are static values. Consider this example:
Since
url
isn't a true constant (it uses another variable to determine its value), I keep it lowercase.Also, I only use constant case at the top level scope, or when I'm importing constants from another file.