A friend said that he wanted to learn javascript, but he didn’t know how to learn it. In this article, the editor summarizes the important knowledge points and learning methods of JavaScript. It is a bit long, but it is very useful. I hope it will be helpful to you.
The simpler the development environment, the better. Don’t waste time on this link.
First let’s talk about the choice of editor, sublime text, vs code, atom, webstorm, and HBuilder. When a newbie gets started, he always wants to find the best editor. In fact, this editor is just like choosing a hero in the game. There is no most powerful one, only the one that suits you best. If you are still not sure, just choose vs code. I I feel like this is quite friendly to newbies.
Use chrome as the browser, and then you can start coding.
Regarding the JavaScript version, I suggest you start learning from ES5, and then look at the new features of ES2015 after you have a certain foundation.
There are many similarities between learning programming languages and learning natural languages. We have to start from the most basic words and grammar.
You must be very familiar with these basic grammars, otherwise subsequent learning will be difficult.
Object is a very important concept and must be grasped flexibly:
Each object has many methods. Just know where to look for these methods. Don’t memorize them. Just like when we learn English, we need to memorize necessary words, but most of the words know how to use them. Just look it up in a dictionary.
The process of learning [Basic Grammar] and [Object] is relatively boring, and the connection between knowledge points is not particularly close. Just like when we learn Chinese characters in the first grade of elementary school, we know what each character is, but I don't know how to put them together, so I only practice word formation, sentence making, and composition writing in elementary school. We compare the projects we are doing to writing essays, so we still have a way to go, so don’t be impatient.
DOM also provides many methods. Still don’t invest too much energy. Newbies who are self-study will always be troubled by these large numbers of methods. What we need to do is to have a general understanding of DOM. As for We can completely replace those messy interfaces with jQuery or frameworks in the future.
(If you are interested in DOM, you can come back and study in depth after you have mastered the skills a little more comprehensively, but investing a lot of time in the early stage will indeed affect the learning efficiency)
jQuery is a must, but it is really easy to get started with jQuery. It takes two days to understand the usage of jQuery, and then you can use jQuery to achieve various page effects. There will definitely be stumbling in the early stage, but There is a lot of information on jQuery, just learn and do it at the same time.
After you are proficient in jQuery, you can start to learn more advanced JavaScript content:
The difference between primitive types and reference types
Various type conversions and type detection
Closure: Functions within functions, just don’t fool yourself no matter how you apply them.
Prototype: How constructors, prototype properties, and prototype-based inheritance are implemented.
this: You can open a pit and study it carefully
Node can now be said to be a must-learn for the front-end, but instead of learning to use node as the backend, use Various tools in the node ecosystem, by the way, use node to understand the background.
It is best to use express to write a simple background program (one server.js is enough) to handle some requests, so that when we learn ajax, we can write the background interface ourselves. Of course, this requires basic knowledge of the http protocol.
Like promise, Async/await functions, etc., it all depends on your ability. If you are interested, take a look. If you don’t look, it will not affect your subsequent learning. However, even if you don’t learn it now, you will still need to make up for it in the future.
Simply put, understand the http protocol, what is a request, what is a response, what are the differences between get and post, and then learn ajax and see that the syntax is basically Got it.
That’s enough to know these. Whether you are working or studying, you will definitely encounter many problems in the future. We will analyze the specific problems in detail at that time.
Choose one of react, angular, and vue. Beginners with zero foundation strongly recommend vue. If you are switching from backend to front-end, angular is recommended. If you are a technical front-end, react is recommended.
This article is for novices with no basic knowledge, so naturally it is better to choose vue.
Through these ten steps, you can have an overall understanding of the JavaScript system, and then focus on which direction to develop, depending on your hobbies or work needs. The road to technology is long and this is just a starting point.
The above is the detailed content of How to learn js. For more information, please follow other related articles on the PHP Chinese website!