Three-tier structure and application

DOCTYPE

The DOCTYPE declaration instructs the web browser which version of HTML the page uses to parse the instructions.

AMP

Speeding up mobile web pages is an HTML proposal specification implemented by Google to improve the efficiency of page resource loading. Use strictly limited efficient HTML tags and use static web page caching techniques to improve the performance and user experience of web access to static resources.

JUDGMENT

The Document Object Model (DOM for short) is a standard programming interface recommended by the W3C organization for dealing with extensible markup languages. On a web page, the objects that organize the page (or document) are organized in a tree structure, and the standard model used to represent the objects in the document is called the DOM.

HTML5

HTML5 adds more new semantic tags, such as <header> <video>, etc.

Added some attributes to the original label, such as input type, added color, date, time and other attributes

ShadowDOM WebComponent

ShadowDom is a specification of HTML that allows developers to encapsulate their own HTML tags, CSS styles and JS codes with features, and also allows developers to create their own custom first-level tags. The created new tags and related APIs are called for WebComponent.

ESMAScript5

Strict mode: restricts some of the original non-standard writing methods, and makes some unreasonable grammars report errors directly.

json: supports the use of json parsing methods in IE8 and lower browsers

Object: Added properties and methods

Array method properties: The prototype methods of built-in array objects have been extended and improved, adding indexOf, forEach, filter, map, etc.

Data.now(),Data.toJson

deep copy vs shallow copy

Shallow copy is to copy the address of the object , and does not open up a new stack, that is, the result of the copy is that two objects point to the same address, modify the attributes of one of the objects, the attributes of the other object will also change, while the deep copy It is to open up a new stack . Two objects correspond to two different addresses. Modifying the properties of one object will not change the properties of the other object.

A deep copy can be done by creating a new object and then recursively copying it or using json parsing to copy it.

ESMAScript6

let, const: both let and const can only be declared as block-level scope variables, and can only take effect within the block-level scope. Variables declared within a block cannot be referenced outside the block level; variables declared with const must be initialized and assigned , and once assigned, the assignment cannot be modified twice; using let, const variables declared in the global scope are not added to the global scope object as attributes.

destructuring assignment

New array features: Array.prototype.find, findIndex, etc., keys(), values(), entries() and other traversal methods

Function parameters: ES6 has a new design for function parameters, adding default parameters, indefinite parameters and extended parameters.

Arrow function: its this is the same as the outer this. It can be understood that its execution context only has variable objects and scope chains, and has no this value.

Enhanced objects: You can improve coding efficiency by using property shorthand, variables as property names, or omitting object function properties.

class: class

Module module: import/export

Loops and Iterators: iterator iterator.next()

Collection types: Map, Set, WeakMap, WeakSet

Promise: Avoid the problem of multiple nested callbacks in asynchronous operation functions


ESMAScript7

exponentiation operator

Array method: include

Async function async/await



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324733394&siteId=291194637