js is very confusing, how can I learn to get started?

foreword

ES5 still needs to be learned. There are many important concepts in it, which are strongly related to ES6, generally including:

  1. Variable declaration ES5 uses the var keyword to declare variables, while ES6 introduces the let and const keywords for declaring block-level variables and constants. These new keywords give developers more control over the scope and lifetime of variables, avoiding some common JavaScript pitfalls.
  2. Function declarations There are some subtle differences between function declarations and function expressions in ES5, while ES6 introduces new features such as arrow functions and default parameters, making function definition and calling more concise and flexible. Arrow functions can handle context and this pointer issues more conveniently, and default parameters can make function parameters more flexible and easy to use.
  3. Objects and arrays The definition and operation of objects and arrays in ES5 is cumbersome, but ES6 introduces new features such as object deconstruction, array deconstruction , and extension operators, making the definition and operation of objects and arrays more concise and convenient. Object destructuring can more conveniently access and manipulate the properties of objects, while array destructuring can more easily access and manipulate the elements of arrays, and the spread operator can more conveniently merge and expand objects and arrays.
  4. Class and Inheritance There is no concept of class in ES5, but ES6 introduces the concept of class and inheritance , which makes JavaScript closer to the traditional object-oriented programming language . Classes can more easily define and maintain the properties and methods of objects, while inheritance can be more convenient To achieve code reuse and extension.
  5. Modularization and import and export There is no native modular mechanism in ES5, but ES6 introduces the concept of modularization and import and export, which makes JavaScript modular programming more convenient and easy to use. Modularization can organize and manage code more conveniently, and import and export can share and reuse code more conveniently.

In general, both ES5 and ES6 are important versions of JavaScript, there are some minor differences and new features between them, but together they form the standard specification of JavaScript. Learning ES5 can help developers better understand and use old projects and code bases, and it also helps to better understand and use ES6. It is recommended that when learning JavaScript, learn ES5 first, and then gradually learn ES6 and later versions For features and grammar, you can take a look at the following summary of some knowledge points about Js, which may help you~

Put the road map first

Some important knowledge points

basic knowledge

· Declare variables

· null and undefined

Detailed explanation of JavaScript strict mode

Operators & Flow Control

· Operators

·Three major flow control statements

array

·Basic knowledge points of array

·Array operation function summary

object

·Object detailed tutorial

Set collection

· Set object

· WeakSet

Map

· Map object

· WeakMap

Function advanced

Several forms and usage of function declaration

· Immediately executed function (IIFE)

· Function parameters - in-depth understanding of parameter passing, parameter default values, parameter collection and expansion

How does JS use recursion?

Comprehensive analysis of this keyword

Scope and closures

· Execution context and execution stack

Scope and scope chain

· The concept, principle, function and application of closure

Prototype and Inheritance

·Prototype and prototype chain

· Commonly used eight inheritance schemes

kind

· Basic knowledge of class

· Static methods

· Class inheritance

Modular

Modularity—module exposure and module import

regular expression

·Regular Expression Syntax Encyclopedia

·The most complete JavaScript regular expression in the whole network (check numbers and letters)

Promise

· Understanding JavaScript Promises

Help you understand Promise prototype methods then, catch, finally

·Illustrate the principle of Promise implementation - Promise chain call  ,

· Understand JavaScript's async/await)

DOM&BOM object

· DOM binding event, event flow mechanism, event delegation, event object

·DOM operation arrangement

·BOM operation arrangement

· AJAX cross-domain

·Detailed explanation of local storage

space coordinates

· Use of spatial coordinates

event

·Event processing

·Event Reference Manual

·HTML DOM event listener

network request

· XMLHttpRequest introductory tutorial (very detailed)

JS requests data through fetch

canvas

·Canvas Tutorial - Web API Interface Reference

Related book recommendation

The Definitive Guide to JavaScript, 7th Edition

This book is suitable for people with certain programming experience. Of course, beginners can also buy it to learn. It is a must-read book for JavaScript programmers.

"" [e-book] download link:

Link: https://pan.baidu.com/s/1SX7fUWw5DIXH6Ve21UVdGA?pwd=siki  Extraction code: siki

"" [Paper Book] Link : https://product.dangdang.com/11163420580.html

Continuously updating...

write at the end

The basics of native JS are very important. Don’t worry about whether you spend too much time on native JS if you learn in a cyclical and gradual manner . The content to be learned later is based on this foundation. Basic knowledge requires time. Precipitation and a lot of code practice, whether it is ES5 or ES6, you need to have an open-minded learning attitude. I believe that if you learn according to such an attitude, no matter what you learn later, you can make a reasonable plan in your heart. Including the update of JS in the future, you can have your own learning methods and skills, I hope it will be helpful to you!

Guess you like

Origin blog.csdn.net/soukenan/article/details/130081939