node-style-guide | A guide for styling your nodejs / JavaScript code Fork & adjust to your taste | Runtime Evironment library
kandi X-RAY | node-style-guide Summary
kandi X-RAY | node-style-guide Summary
A guide for styling your node.js / JavaScript code. Fork & adjust to your taste.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of node-style-guide
node-style-guide Key Features
node-style-guide Examples and Code Snippets
Community Discussions
Trending Discussions on node-style-guide
QUESTION
In the node js style guide it says that constants should be uppercase and declared with var
instead of const
Can anyone explain why is it so?
I tought that const
was invented to declare constants !?
Also, why should they be all uppercase?
...ANSWER
Answered 2017-Oct-11 at 07:31Using capitalized variables for constants was used before ES6
version. There is a common agreement to set the names of constants with uppercase to inform developers that the value of this variable must not be changed, another case was to set the private properties with prefix _
.
After ES6
there is a keyword const
which is used to declare constants. Variables declared with const
keyword don't let to change their value during the lifetime of the variable.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install node-style-guide
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page