In projects where there is often a team working together, communication costs are involved. Unified development habits and code specifications can reduce the cost of communication, and facilitate taking over and handing over. If a unified style is not followed in development, the project code will be chaotic, which means that it will suffer ridicule from colleagues. Just like a room that has never been tidied up, only I may know where the clothes are in the corner. If I put things in the corresponding position according to the norms, even if I am not myself, I can quickly find what I want according to the norms.

Code makes sense

1. Delete console.log() 2. Delete functions, files, and variables that are not used. The Ali front-end code specification is named after the team code specification

Improve code readability

1. Standard naming, according to the team code specification development, from the name can know the meaning of the variable, such as userId 2. A single function corresponds to a single function point, clear and simple

Simplify the code

1. Use es6 and other simplified code websites. 2. Use third-party libraries, such as LoDash Chinese document 3. Reduce the writing of repetitive code, extract the same logic of integration processing functions, while componentizing development

Improve internal work

1. Strengthen JavaScript fundamentals by reading the Little Red Book (reading is a bit boring) 2. Learn data structure and algorithm force buckle 3. Look at vUE source code, do not become an API tool source code parsing

conclusion

Digging gold for a long time, gradually found their own deficiencies [vegetable chicken solid hammer], to the gold of the big guy look.