If you can go back to the past, I will tell myself this sentence: "I ignore the compatibility of DOM and BOM when I first learn JavaScript" "
My first time I was in the situation
The most headache when I first learned JavaScript was the problem of browser compatibility. It is not possible to display a good code under Firefox under IE, or the code that can be displayed normally on IE has reported an error in Firefox.
The responsibilities of front -end development engineers include cross -browser development. So when I do n’t know the language of the JS, I spend time learning to learn browser compatibility knowledge, which will increase the difficulty of JS learning. But the code that cannot be compatible with the mainstream browser cannot be used in actual items.
The compatibility of DOM and BOM once made my JavaScript learning stagnation. The language is not enough, and the code can only run in a specific browser.
My suggestion
If you are starting to learn JavaScript and have the same situation as me, I suggest you: when you first learn JavaScript, you ignore the compatibility of DOM and BOM, and spend more time to understand the language itself. Only in a specific browser to write code (Chrome/Firefox/Safari), and use mature JavaScript frameworks (jQuery, etc.) in actual work. Don't worry, few companies will let JS novice use native JS for front -end development.
What are the benefits of learning JS in the early days of ignoring compatibility
Reduce learning difficulty
Reduce frustration
Spend more time to learn ECMAScript
When do you learn JS cross -browser development knowledge
When will the browser compatibility problem be resolved?
When you can use the JavaScript framework to write a reusable code (jquery plug -in or front -end control), or when you are going to develop a JavaScript framework.
Other JavaScript beginners suggest
Do not take JavaScript authoritative guidelines as entry books
You should use JavaScript Advanced Programming (3rd Edition) as an entry book
The knowledge of the value and the value of the value, the knowledge of the value of the value must be understood
The debugging tools must be understood and used more, and learn to capture errors by themselves. (Chrome Developer Tool/Firebug)
Patience and patience can be easier for every knowledge point.
The above is some of my sharing hope that if you can help you who are new to JavaScript, if you think there are misleading places, please immediately point out.