With the development of new technology, JavaScript is no longer just a network language. Now we can see a lot of mobile phones that use JavaScript to build Web applications based on local browsers, as well as a lot of flexible web applications like Trello. JavaScript-based applications are already very popular in the world.
Currently, JavaScript is still a relatively easy to use and deal with the programming language, many people think of it as the first programming language to learn. As a JavaScript programmer, there are several key habits that you have to develop that will help you become a good JavaScript developer. Let's take a look at what the habits are!
30 lines of code per day
Time will be gone, if you always tell yourself what to do tomorrow, then tomorrow Day, tomorrow how many! To avoid this, you should keep writing 30 lines of code every day, so your foundation will be very solid! Then add another 10 lines a week and you'll find your progress is fast!
Learn to write documents before writing code
While not everyone agrees with this, writing a document is the best way to explicitly write code, and when you write code comments, you'll be particularly clear when writing complex code. Effective, resource-rich and understandable annotation is the essence of program design, should be recognized by everyone.
Firebug/chrome Development Console
An experienced JavaScript programmer does not write as many JavaScript code every day, but instead constantly looks at the bugs and deficiencies in the code it has written. Firebug is free, every Chrome browser has a chrome development tool integration installed, but you should still learn how to use these tools to debug your code, because that's a problem that every language can't ignore--debug!
Find a suitable Code Editor
Forget about Notepad, as a developer, you should find your own appropriate code editor that will help you do more in less time. You can find the right code Editor on the Web, and it's worth taking a few months to learn and master it.
Monitoring errors
Monitoring errors are almost as important as writing code annotations. As an inexperienced programmer, the most important thing you need to do is to test your code for errors. Always keep track of your application and delve into where the error occurs, and the next time the same problem occurs, you will have the appropriate solution.
Linting
Even experienced programmers use the Linting tool to check for common errors or other minor errors that occur in the code, and we recommend that you use any of the three tools: (1) jshint (2) jslint (3) Closure Linter
Join a JavaScript Community
Join a better JavaScript community, with excellent JavaScript programmers from around the world who can give you a lot of good advice to help you solve a lot of problems smoothly during your work. You can also be part of one of them and share your programming experience with others.
Understanding the development framework
Now that the framework is highly flexible and customizable, mastering a framework can dramatically change the way you write programs. You can look for the framework you need in your community, each with its own strengths and weaknesses, and knowing that can help you grow quickly and help you understand what kind of framework the project will apply to. PHP100 recommends that you refer to the "secret node.js popular reason."
belong to your own code base
When you begin to master programming, you will find that over time many of the code is actually repetitive. When you need to solve a specific problem, you know which code you should turn to. This is why the library is created, and it is a more flexible way to help developers solve the wide-collar problem. Depending on your coding habits, creating a library of your own will help you solve problems more easily.
Maybe it will fail.
This is a pleasant thing to do, but you must know that failure is your greatest enemy, and that you must be fully aware of it. When you stop learning, you will make important progress in your career if you persist in overcoming these difficulties.