search
HomeWeb Front-endJS TutorialSummary of the Road to Efficient Learning of JavaScript

Summary of the Road to Efficient Learning of JavaScript

Aug 04, 2017 pm 01:31 PM
javascriptjsSummarize

1. First, I will install the Chrome browser and practice directly in the dev tools => console to become familiar with basic syntax, variables, data types, mathematical operations, and characters. String operations, conditions, basic loop structures, simple function definitions and calls, etc. The reason why I use chrome dev tools is because I don’t want to bother with a separate editor at this time, nor do I need to open files and folders, and then configure some The tools finally come into contact with real JS programming. I want to start writing JS as directly as possible with as little interference as possible. This is the most important thing. I learn JS, and of course I should write JS as soon as possible

2. Familiar with the basic syntax In the future, I will compile a few slightly challenging small programs in devtools => console, such as implementing a simple fibonaci sequence, such as printing a 99 multiplication table. You can also give yourself a few questions, or Randomly find interesting topics on the Internet. Whether others have written about them or not is not the point. The point is to find something to do and let yourself write code. Don't underestimate these boring-looking programs. Once you have reached the level of proficiency, you can start the first one. Before the project, these small programs that are not available are the most suitable for practicing, because they do not involve other aspects of knowledge (such as DOM), so you will not be disturbed too much. You only need to focus on writing the correct program with correct syntax. This The process will make you more familiar with the JS language itself.

3. I think you can learn to use JS for web development at about the same time, but don’t worry, I’m not ready to create a new project at this time, so I will still be in devtools, but the focus is Familiar with DOM, I will start with simple window.alert, window.prompt, and slowly experiment with how to use the DOM API. I will buy a book on DOM programming, put it on my desk, and read chapter by chapter. While watching and trying, I gradually came into contact with the common operations of DOM, such as document.getElementById, document.getElementsByClassName, addEventListner, etc. These calls contain very important concepts, such as what is ID, what is Class, what is Event , what are they used for, and how does the JS language interact with them through APIs. I will select several website pages and make some modifications to the elements of the page, such as using JS to change the font and background color of the elements, or temporarily add event listening, etc. You can directly see the effects of the behavior of the DOM API on the web page. It is very intuitive and interesting. It is more vivid than writing pure JS programs before and can stimulate the curiosity of learning. DOM is the core knowledge of JS programmers.

4. Usually after reading a book on DOM programming, you have a general understanding of the use of JS in web programming. At this time, I will choose a project for myself, such as a message board, and use HTML5 Boilerplate as a template to start the development of the first web front-end project. Data can be stored directly in IndexDB, so there is no need to worry about background operations at this time. I will roughly consider what functions I want to do, and then use the knowledge I learned before about JS and DOM operations to implement these functions well. This project is going to take a lot of my time, so I tell myself to be patient. When I encounter a question, I will use a search engine to find the answer, or go to the book to find the corresponding chapter.

5. After writing the first project, I will feel a sense of accomplishment for the first time, even though the project is small and not complicated. I will find a teacher to review it for me and listen to his opinions and suggestions. I can also prepare some questions and ask him to help me see how to iterate next. At this time, I will learn the basic operations of git and the basic use of github, then push the project and commit the required changes to git.

6. Before this, I wrote all native JS, without using libraries or frameworks. The advantage of this is that I don’t need to get entangled with the concepts of libraries and frameworks prematurely, because now What is really important is the JS language itself. In fact, my programming field has been greatly expanded compared to the beginning. You see, I have used JS and DOM to write some very practical functions and completed a front-end project.

7. At this time, I have more choices. I can: continue to use native JS to complete one or two similar projects, such as registration and login, dynamic picture display, etc.; I can also: try to improve the program of the current project. Design and make some code improvements. At this time, you can read books like JS patterns, because the code structure of the first project usually does not have special programming, but the structure. Such books can tell you that better JS programs can How? I can also take advantage of the opportunity to restructure the project I am working on into jQuery-based code, so that I can learn the basics of jQuery and understand the benefits of jQuery through comparison; I can even restructure the current project code into ES6 syntax, so that it can be used in Benefits of ES6 syntax in comparison.

8. Next, I will write more complex projects, such as TODOLIST, and implement such an application from beginning to end. I will also write the first version in native JS (ES5), and then choose whether to refactor to jQuery. Or ES6, or even TypeScript if interested. If you continue to read books on JS programming, your attention should be on the "design" of the program, not on the grammatical details. Most of the time, grammatical issues can be searched. Program "design" is to analyze the needs of the application, what functions, whether it needs to be divided into modules, whether the modules are easy to divide, how to gradually find the architectural solution, what kind of modularization is more natural, how to deal with errors, whether Template support is required, whether complex use cases should be implemented by oneself or integrated with third-party libraries, and other issues that are far away from actual development.

9. I will still put this project into github. After writing it, I will find a teacher (free or paid does not matter) to review my implementation and let him point out the mistakes in my understanding. This is valuable learning opportunities. Just like the first project, I will still decide whether to continue iterating and how to continue to improve based on the teacher's feedback and my own thinking. By this time, I may buy and read all the must-read Javascript books on the market. Reading the first book is very slow, and the second book is not fast, but when I read the fourth or fifth book, I can read it very quickly. , select the chapters that you don’t understand and read them specifically, and then apply the knowledge, skills, and practices mentioned in the book to the projects you have written before.

10 I now have a relatively comprehensive foundation in JS (ES5) and am relatively proficient. At least when I encounter a problem, I roughly know what the direction is. I've also been exposed to jQuery, maybe even familiar with it; so is ES6. I have a relatively comprehensive and profound image of the basic ecology of language. Now I want to learn a framework. I will do some homework to see which framework I like. After choosing it, I will first complete the official tutorial and understand some basic conceptual issues.

11. Then what I did was to rewrite the previous project (such as TODOLIST) using the framework. At this time, I would no longer feel that it was very profound, because I had JS. Basically, I already have some experience in finding answers and debugging on my own. Even if the framework itself is unclear, I can find the answer by myself through searching or research. Even if I can't find it, I at least have basic development thinking. Although I don't know the answer, I still have a general direction. If I want to ask others questions, I can also ask questions that are more valuable to answer. I have become a professional. The path to development is not because I know this and that of the framework, but because I have the basic habits and qualities to do development.

12. Maybe I found my first front-end job at this time. After a while, I found myself interested in node backend development and electron. After reading the basic documents, I found that it was not necessary. How to learn how to use these things. Because I am already familiar with the architecture, common structures, patterns, and main concepts of JS programs, so as long as it is in the JS ecosystem, no matter what new technology is released, whether it is a library, framework, or pattern, I can be the first to do so. It takes time to find a way to understand them. I have learned how to learn, what are the important things in JS programs, and how concepts are combined and changed. So for me, there is no difference between learning JS and using JS.

13. Then, usually those who really learn it step by step and have a solid language foundation no longer need anyone to teach them.

I think there are some concepts and operations that are contrary to step-by-step.

1. Pursuing "systematic" learning too early is too high-minded. It is easy to be too ambitious and low-handed. People's energy is limited. You must respect the rules of learning, admit that you are an ordinary person, and warn yourself not to be tricky or greedy. , take your time

2. I feel that reading source code is the most "essential" learning, but as a result, I fall into the pit of details and cannot extricate myself

3. I immerse myself in the "latest" technology too early, For example, if you learn frameworks before you have a good language foundation, you will get half the result with half the effort. "The latest" technology and core technology are often not the same thing. With the foundation and core, learning new technologies is the most efficient, but the reverse is not true

4. We equate learning programming with reading books and accumulating "knowledge", but programming is ultimately a skill. You can't learn anything if you don't do it. What you "know" and what you "can" are two different things.

5. Trying to find the "best" learning path from the beginning without learning specific things is probably the biggest waste. The meaningful goal is to tell yourself what you will do tomorrow, rather than assuming what you "should" learn tomorrow

6. Excessive accumulation of learning materials, thinking that the more information you find and the more complete the list, the faster you will learn and the better. In fact, it is exactly the opposite. The more you list, the greater the noise and the stronger the psychological pressure and frustration. The easier it is to give up, at one stage, a book and a small amount of online information are enough. "Collecting" is a bad habit. Learners should pursue the digestion of knowledge instead of piling up

The above is the detailed content of Summary of the Road to Efficient Learning of JavaScript. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
JavaScript Engines: Comparing ImplementationsJavaScript Engines: Comparing ImplementationsApr 13, 2025 am 12:05 AM

Different JavaScript engines have different effects when parsing and executing JavaScript code, because the implementation principles and optimization strategies of each engine differ. 1. Lexical analysis: convert source code into lexical unit. 2. Grammar analysis: Generate an abstract syntax tree. 3. Optimization and compilation: Generate machine code through the JIT compiler. 4. Execute: Run the machine code. V8 engine optimizes through instant compilation and hidden class, SpiderMonkey uses a type inference system, resulting in different performance performance on the same code.

Beyond the Browser: JavaScript in the Real WorldBeyond the Browser: JavaScript in the Real WorldApr 12, 2025 am 12:06 AM

JavaScript's applications in the real world include server-side programming, mobile application development and Internet of Things control: 1. Server-side programming is realized through Node.js, suitable for high concurrent request processing. 2. Mobile application development is carried out through ReactNative and supports cross-platform deployment. 3. Used for IoT device control through Johnny-Five library, suitable for hardware interaction.

Building a Multi-Tenant SaaS Application with Next.js (Backend Integration)Building a Multi-Tenant SaaS Application with Next.js (Backend Integration)Apr 11, 2025 am 08:23 AM

I built a functional multi-tenant SaaS application (an EdTech app) with your everyday tech tool and you can do the same. First, what’s a multi-tenant SaaS application? Multi-tenant SaaS applications let you serve multiple customers from a sing

How to Build a Multi-Tenant SaaS Application with Next.js (Frontend Integration)How to Build a Multi-Tenant SaaS Application with Next.js (Frontend Integration)Apr 11, 2025 am 08:22 AM

This article demonstrates frontend integration with a backend secured by Permit, building a functional EdTech SaaS application using Next.js. The frontend fetches user permissions to control UI visibility and ensures API requests adhere to role-base

JavaScript: Exploring the Versatility of a Web LanguageJavaScript: Exploring the Versatility of a Web LanguageApr 11, 2025 am 12:01 AM

JavaScript is the core language of modern web development and is widely used for its diversity and flexibility. 1) Front-end development: build dynamic web pages and single-page applications through DOM operations and modern frameworks (such as React, Vue.js, Angular). 2) Server-side development: Node.js uses a non-blocking I/O model to handle high concurrency and real-time applications. 3) Mobile and desktop application development: cross-platform development is realized through ReactNative and Electron to improve development efficiency.

The Evolution of JavaScript: Current Trends and Future ProspectsThe Evolution of JavaScript: Current Trends and Future ProspectsApr 10, 2025 am 09:33 AM

The latest trends in JavaScript include the rise of TypeScript, the popularity of modern frameworks and libraries, and the application of WebAssembly. Future prospects cover more powerful type systems, the development of server-side JavaScript, the expansion of artificial intelligence and machine learning, and the potential of IoT and edge computing.

Demystifying JavaScript: What It Does and Why It MattersDemystifying JavaScript: What It Does and Why It MattersApr 09, 2025 am 12:07 AM

JavaScript is the cornerstone of modern web development, and its main functions include event-driven programming, dynamic content generation and asynchronous programming. 1) Event-driven programming allows web pages to change dynamically according to user operations. 2) Dynamic content generation allows page content to be adjusted according to conditions. 3) Asynchronous programming ensures that the user interface is not blocked. JavaScript is widely used in web interaction, single-page application and server-side development, greatly improving the flexibility of user experience and cross-platform development.

Is Python or JavaScript better?Is Python or JavaScript better?Apr 06, 2025 am 12:14 AM

Python is more suitable for data science and machine learning, while JavaScript is more suitable for front-end and full-stack development. 1. Python is known for its concise syntax and rich library ecosystem, and is suitable for data analysis and web development. 2. JavaScript is the core of front-end development. Node.js supports server-side programming and is suitable for full-stack development.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft