Only the most impressive points were recorded

React is often used in interviews

The written test

Multiple choice
  • CurrentTarget and Target
    • The former, which points to the element bound by the event, and the latter, which points to the element triggered by the event, are distinct when the event is brokered
  • Internet access requires a subnet mask, network management, and IP address
  • Postfix expression
  • Focus and blur events
  • PostMessage, cross-domain (window)
    • otherWindow.postMessage(message, targetOrigin, transfer)
  • LocalStorage size limit
    • 5M
  • Unstable sort – quicksort and heap sort. Two – way merging algorithm is merge algorithm
  • Clock frequency, CPU
algorithm
  • There’s an algorithm, I forgot, but it’s not hard

One side

It’s a little over an hour long and has two sides

  • Algorithm: Tiled array
/* * Tiled array, The hierarchy of the depth for tile * * const array = [1, [2, [3, [4]], 5]] * * flattenDepth (array, 1) * / / = > [1, 2, 3, [4]], 5] * * flattenDepth(array, 2) * // => [1, 2, 3, [4], 5] */ function flattenDepth(array, depth) { if (depth === 0) return array let arr = [] for (let i = 0; i < array.length; i++) { if (Array.isArray(array[i])) { arr.push(... array[i]) } else { arr.push(array[i]) } } depth-- return flattenDepth(arr, depth) }Copy the code
  • Algorithm: valid parentheses, force buckle on

    • Use the stack idea to solve, use Map store bracket type
  • If your algorithm defines arrays using lets, why not use const?

  • A method to traverse an object

  • Enumerable properties, related methods

  • Object property descriptor

  • Talk about inheritance

  • Talk about the methods of object reuse

    • Depth copy
    • Object.create()
    • The Vue mixin
  • Asynchrony?

Second interview

  • What are you studying recently? How browsers work
    • V8 garbage collection
    • How many processes did the browser just open? What’s the difference between a process and a thread?
    • What happens after you enter the URL? Where does DNS exist?
  • Tell me about the internship program
  • How to log in personal blog project? Token. How many parts does JWT consist of?
  • React useCallback? Never used
  • What have you used? UseState, useEffect. How to use useEffect if you want to call a function only once?
  • What problem do hooks solve? What’s the downside?
  • How is useState implemented? Don’t understand. Guess what the underlying implementation is? I guessed closure. No. Changing the subject, what about closures?
  • How do I check for memory leaks? Console Performance, Memory. Talk about the process?
  • JS single thread, how to perform multiple operations?
  • Talk about the cycle of events
  • The types of errors reported by the system
  • Cross domains? Chatted under CORS
  • Career planning after graduation
Hr side

For 30 or 40 minutes

  • Especially miscellaneous, study, life, work of all angles are talked about