Great God coding style guidelines

js code Style Guide:
1. indented spaces, not with tabs
2 have a semicolon
3 being not ES6 (modules), for example, export and import command
4. discourage (not prohibited) horizontally aligned
5. less var let should be used to elicit or declared const
6. haircut function is preferred
7. template string without setting normal string superimposed
when dealing with complex string superimposed, superimposed in particular multi-line character string, templates string ( `backticks defined) are better choices may be implemented across multiple lines results
8. Do not use the backslash to a long string of each line is divided
9.for .... of write cycles for The preferred embodiment
10 not use the eval ()
11. The name should be lit all uppercase, and separate words are underlined
12 a time to declare a variable
13. Do not use double quotes in single quotes

Guess you like

Origin www.cnblogs.com/huchong-bk/p/11261291.html