1, what are the methods of page optimization

    1. Reducing HTTP requests
    1. Reduce the DOM element count
    1. Strip JavaScript and CSS from your pages
    1. Remove duplicate scripts
    1. Use appropriate image formats

2. Semantic understanding

  1. Semantic HTML is to make the content of the page structured, easy to browser, search engine parsing;

  2. It is displayed in a document format without CSS styles and is easy to read.

  3. Make it easier for people reading source code to divide the site into chunks for easy reading, maintenance and understanding.

3. What is the difference between return, break, and continue

A return must be written inside the function. If a return is encountered, the rest of the code inside the function is not executed. You can also use return to return a value for external use

Break breaks the loop and the rest of the loop is not executed

Continue Jumps out of the loop, and the rest of the loop continues

4. What is the difference between typeof and instance of

Typeof: determines the typeof the object. There are six possible return values

Instance of: Checks whether it is the instantiated object of the peer. The return value is true or false

5. What is the difference between a GET request and a POST request

In a GET request, parameters are placed in the URL, while in a POST request, parameters are placed in the request body. Theoretically, POST is more secure because the URL length cannot exceed 1KB. However, IN a GET request, parameters are placed in the URL