Foreword:
The Chinese New Year is about to be over, and the interview is about to start again. The interview is indispensable for the review of interview questions. The book I shared today is recommended by the byte boss. The 261-page front-end interview question book will help you review and consolidate.
The main content includes CSS, JavaScript, HTTP, TCP protocol, browser, data structure and algorithm
CSS
- How many options are there to center an element horizontally and vertically?
- Advantages and disadvantages of floating layout? How to clear the float?
- What problems will be caused by using display:inline-block? Solution?
- Layout question: div is vertically centered, 10px left and right, and the height is always half the width
- How CSS is laid out
- What is BFC?
- Triggering conditions
- BFC rendering rules
- Application scenario
- …
JavaScript
- What are the primitive data types of JS? What are the reference data types?
- Is null an object? why?
- Why can '1'.toString() be called?
- Why is 0.1+0.2 not equal to 0.3?
- What is BigInt?
- Why do you need BigInt?
- How to create and use BigInt?
- Can typeof correctly determine the type?
- Can instanceof determine the basic data types?
- Can you manually implement the function of instanceof?
- The difference between Object.is and ===?
- [] == ![] What is the result? why?
- What are the types of conversion in JS?
- What is the difference between == and ===?
- According to what process does the conversion of objects to primitive types run?
- Understanding of closures
- What is the relationship between prototype objects and constructors?
- Can you describe the prototype chain?
- How does JS implement inheritance?
- Why are the arguments of a function not an array? How to convert it into an array?
- Does return in forEach work? How to interrupt the forEach loop?
- JS judges whether the array contains a certain value
- Flat in JS-array flattening
- Higher-order functions in an array
- Implement the array map method
- Implement the array reduce method?
- Implement array push and pop methods
- Implement the array filter method
- Implement the array splice method
- Implement the array splice method
- Implement the array sort method?
- Simulate the effect of realizing a new?
- Simulate the effect of a bind?
- Implement a call/apply function?
- Talk about your understanding of this in JS
- What are the methods of shallow copy in JS?
- Write a full deep copy
Advanced
- How is the data stored?
- How does the V8 engine collect garbage memory?
- Describe the process of executing a piece of JS code in V8?
- Introduction of MacroTask
- Introduction of MicroTask
- Understanding EventLoop
- The main difference between nodejs and browser about eventLoop
- A note about process.nextTick
- How is asynchronous and non-blocking I/O implemented in nodejs?
- What are the solutions for JS asynchronous programming? Why are these programs appearing?
- Simply implement the callback function mechanism in node?
- How did Promise eliminate callback hell?
- Why does Promise introduce microtasks?
- How does Promise realize chain calling?
- Realize the resolve, reject and finally of Promise
- Realize Promise's all and race
- Talk about your understanding of generators and coroutines
- How to make the asynchronous code of Generator complete in order?
- Explain the operating mechanism of async/await.
- What are the problems with using await in forEach? How to solve this problem?
- About some important api implementations in JS
Note: The space is limited, part of the content is replaced by screenshots, if you need more detailed content, you can click here to get the full version of "Front-end Interview Questions Collection" PDF document
Computer Network
HTTP
- What is the structure of the HTTP message?
- What are the HTTP request methods?
- What is the difference between GET and POST?
- How to understand URI?
- How to understand HTTP status codes?
- Briefly summarize the characteristics and disadvantages of HTTP?
- How much do you know about the Accept series of fields?
- How does HTTP transmit fixed-length and variable-length data?
- How does HTTP handle the transfer of large files?
- How to handle the submission of form data in HTTP?
- How does HTTP1.1 solve the problem of HTTP header blocking?
- How much do you know about cookies?
- How to understand HTTP caching and caching proxy?
- Why is the proxy cache generated?
- Origin server cache control
- Client-side cache control
- What is cross-domain? How does the browser intercept the response? How to solve?
- What is the process of TLS1.2 handshake?
- Traditional RSA handshake
- The difference between RSA and ECDHE handshake process
- What improvements have been made in TLS 1.3?
- What are the improvements of HTTP/2?
- How is the binary frame in HTTP/2 designed?
TCP protocol
- What is the difference between TCP and UDP?
- The TCP three-way handshake process?
- Why is it three times instead of two or four times?
- Can data be carried during the three-way handshake?
- Talk about the process of TCP waving four times
- Why wave four times instead of three?
- The relationship between semi-connected queues and SYN Flood attacks
- How to deal with SYN Flood attacks?
- Introduce the fields of the TCP packet header
- Principle of TCP Fast Open (TFO)
- Talk about the role of timestamp in TCP packets?
- How is the TCP timeout retransmission time calculated?
- TCP flow control
- TCP congestion control
- Talk about the Nagle algorithm and delayed confirmation?
- How to understand the keep-alive of TCP?
Browser
- Browser cache?
- Talk about the browser's local storage? What are their pros and cons?
- Tell me about what happened from the URL input to the page rendering?
- Talk about your understanding of redrawing and reflow
- XSS attack
- CSRF attack
- Why does HTTPS make data transmission more secure?
- Realize event stabilization and throttling?
- Realize lazy loading of pictures?
Data structure and algorithm
Linked list
- Simple reversal linked list
- Interval reversal
- Two sets of flipped linked lists
- K flip list
- How to detect that the linked list forms a ring?
- How to find the starting point of the ring
- Merge two ordered linked lists
- Combine K ordered linked lists
- Judge palindrome linked list
Stack and queue
- Valid parentheses
- Multidimensional array flatten
- Normal level traversal
- Zigzag hierarchical traversal of binary tree
- Right view of the binary tree
- Perfect square number
- Word Solitaire
- Priority queue
- Notes on the heap
- Achieve a maximum heap
- Implement priority queue
- Top K high frequency elements
- Merge K sorted linked lists
- What is a deque?
- Maximum sliding window
- Stack implementation queue
- Queue implementation stack
Binary tree
- Traverse
- Given a binary tree, find its maximum depth
- Given a binary tree, find its minimum depth
- Symmetric Binary Tree
- Nearest common ancestor of binary tree
- Nearest common ancestor of binary search tree
- The diameter of the binary tree
- All paths of the binary tree
- The maximum path of the binary tree and
- Convert an ordered array to a binary search tree
- Binary tree expands into linked list
- Different Binary Search Trees II
Note: The space is limited, part of the content is replaced by screenshots, if you need more detailed content, you can click here to get the full version of "Front-end Interview Questions Collection" PDF document