This post started on my Github.

In the middle of the year, I decided to leave my current company in order to be severely beaten by the outside society. I also interviewed 2 good companies (Bytedance and Pinduoduo), which I share here.

Bytes to beat

Bytedance’s technical interviews take the form of video interviews.

1 round

1.1 Self-Introduction

1.2 JS basic knowledge

The basic types, typeof and Instanceof in JS are mainly investigated.

1.3 = == = =judge

Conventional type comparison questions, compare the basis.

[] = =false
false= =false
[1] = = [1];
1= = ="1";
Copy the code

1.4 Handwritten Debounce function

function debounce(func, wait, immediate) {
  let timeout;

  const debounced = function() {
    const context = this;
    const args = arguments;
    const later = function() {
      timeout = null;
      if (!immediate) {
        func.apply(context, args);
      }
    };
    constcallNow = immediate && ! timeout; clearTimeout(timeout); timeout = setTimeout(later, wait);if(callNow) { func.apply(context, args); }}; debounced.cancel =(a)= > {
    clearTimeout(timeout);
  };

  return debounced;
}
Copy the code

1.5 What happens to the browser from entering the URL

1.6 Handwriting Inheritance (ES5, ES6)

1.7 Algorithm: JS calculates four operations string “1 + 2 * 3 + 3/3”

Second round

2.1 Talk about Vue and React

2.2 Why does Vue continue to use the Mixin mechanism abandoned by React

2.3 How to perform js performance analysis

2.4 How to design common components and business components

2.5 WebPack packaging optimization

2.6 How do Two Processes Communicate with each other? What does a subnet mask do?

Suddenly asked about operating systems and computer networks.

2.7 Differences between HTTP status code 204 and 304

2.8 implementationsumfunction

sum(1) = =1;
sum(1) (2) = =3;
sum(1) (2.3.4) (5) = =15;
Copy the code

Notice that this is still an implicit conversion.

function sum(. args) {
  let value = 0;

  function innerSum(. args) {
    value = args.reduce((a, c) = > (a += c), value);
    return innerSum;
  }

  innerSum.valueOf = function() {
    return value;
  };

  returninnerSum(... args); }Copy the code

2.9 How are dependencies in package.json version-controlled

2.10 Algorithm: js array three sum

The third wheel

3.1 Choose one project that I have done before and introduce it

This question focuses on how well you understand and grasp the overall project.

  1. Project background
  2. How did the project proceed, what problems were encountered during the process and how to solve them
  3. How the project ensures code quality (unit tests, code specifications, submission specifications, automated CI, etc.)
  4. Versioning of projects

3.2 The responsive principle of Vue

3.3 What are the higher-order components in React?

Mainly investigate HOC, enumerating which higher-order components have been written and what effect they have.

3.4 Handwritten observer mode

A lot of spelling

1 round

1.1 Self-Introduction

1.2 Introduction to previous projects

1.3 Differences between break, continue, and Return keywords in JS

1.4 What are the data types of JS

1.5 What properties are under the Window object

1.6 Differences between HTML Property and Attribute

1.7 What are the array methods in ES6?

1.8 What are the new data structures in ES6? What’s the difference?

1.9 What are the CSS Box models? The difference?

1.10 How do I Clear floating information in the CSS? How does it work?

1.11 What is the CSS BFC?

1.12 How to optimize WebPack (e.g. build speed optimization, code optimization, etc.)

1.13 How do I Write the WebPack Plug-in?

1.14 How is loader implemented in Webpack? (For example, vue-loader)

1.15 How to define the data model of VUEX and write the side effects between data models?

1.16 What do you know about Vue and React

1.17 Some understanding of RXJS, how to throttle requests

1.18 Learn about new front-end technologies

Second round

Maybe the first one asked too many questions, while the second one was light and short.

2.1 Understanding React and Vue

2.2. React Hooks

2.3 Why is setTimeout incorrect and how can I solve the problem

2.4 Talk about functional programming

2.5 Talk about previous projects

As with Bytedance, the overall understanding and mastery of the project will be evaluated.

conclusion

Two company is not so difficult (though may be considering I only 1 year work experience), but still aftertaste up wanting more, always think in high school mathematics teacher the harrowing experience hair paper says, “you see, more simple, the examination paper of 150, at least 120 is a foundation, zha what won’t you?”.

Finally, I hope that after 2 years, I can go to Ali.