The ultimate front-end interview questions in 2020-javascript will all ask

2020 interview javascript

The language features of javascript
Single-threaded interpretive language: explain
the process of executing one line of js execution,
grammatical analysis, pre-analysis, interpretation and execution

Precompiled

Regarding pre-analysis and execution context, you will be able to read this after reading this

Prototype chain

Essential understanding of JavaScript prototype and prototype chain

Scope chain

Scope scope chain detailed explanation and common exam questions

Closure

Detailed description of the closure of the portal

Execute function immediately

Immediately execute function detailed explanation portal

What are the commonly used data types in js?

js data type and type judgment
The data type in js is divided into basic types and reference types (object types)

  1. Basic type: number null boolean string undefined symbol (new in ES6) The value of the basic type cannot be modified.
    Note:
    (1). number null boolean string undefined is called the primitive value that can not be divided into the basic type
    (2). Symbol is a new data type added in ES6, which means that it is unique. It is generated by the symbol function call. Since the generated symbol value is the original value, the symbol function cannot use the new call
    (3). Null and undefined are usually regarded as special values. The only value of the two types is itself.

  2. The reference types array and function are subtypes of objects. Objects are logically an unordered collection of attributes and are used to store various worthy containers.
    Object value storage is a reference address, and the value of an object is variable.
    2. It is a weak type for js. Language understanding?
    js is a weakly typed language, and js does not pre-determine the type when declaring variables. The type of the variable is its value type, which
    means that the current type of the variable is determined by the type of the current value. The last second may be string and the next second may be It is number. This process may perform certain operations.
    Type conversion has occurred . Although the feature of weak type that does not require pre-determining the type brings us convenience, in order to make full use of this feature, we must master the principle of type conversion.

  3. The data type returned by typeof The returned six types of values ​​are all strings
    (1), typeof + space returns six types of values ​​number string Boolean undefined function object
    (2), *typeof(null)-object Undefined-undefined Distributing an undefined variable in Function-function Typeof will return undefined

What happened in the process of new an object

  1. Create an empty object with this={} implicitly at the top of the function body
  2. Execute this.xx = xx; add attribute methods to this
  3. Implicitly return this

Array common methods and array de-duplication

Common data processing methods and array deduplication

What happens when the URL is input to the page rendering

What happens when the URL is input to the page rendering

Anti-shake and throttling function

Anti-shake and throttling

Deep copy

Deep copy

inherit

inherit

Xss and csrf front-end security

Front-end security CSRF and XSS

js this problem

The point of this, call apply bind

Guess you like

Origin blog.csdn.net/pz1021/article/details/104764187
Recommended