Front-end interview questions

  1. What are the values ​​printed by the following two logs?

     var a = 1
     function fn (a) {
      console.log(a);
       a = 3
     }
     fn()
    console.log(a);

Output result: undefined 1

The first printed a function does not pass actual parameters, so the printed parameter is undefined

Printing the second a is the value of var a = 1, the function a is assigned to the formal parameter but not to the global a (proximity principle)

  1. $nextTick can be called in create

  1. C3's var function

This method can be used if the attribute value is used in multiple places

The earliest browsers do not support the definition of css variables, so use less, sass (capability to provide variables)

 语法:
 1. 定义:--css变量名:css变量值
 2. 使用:var(--css变量名)
 作用域:
 1. 局部变量 =》 .类名 {    }
 2. 全局变量 =》 :root {    }
  1. H5 new attributes

  1. Elements are centered horizontally and vertically

  1. git

  1. C3 added

  1. The difference between v2 and v3, which one is better

  1. Vue life cycle

  1. Vuex refreshes the page data and there is no how to solve it

  1. holy grail layout

  1. How to solve cross domain

  1. The difference between uniapp development applet and vue development PC side

  1. The difference between e.target and currenttarget

  1. The difference between foreach and map

  1. How does foreach force exit

  1. v-model syntactic sugar

  1. How to change the component using v-model without input and vaule (model)

  1. How to delete the second element of the array

  1. The method of judging the array

  1. The difference between hash and history

instanceof
Object.prototype.toString.call() can get different types of objects
Array.isArray() is used to determine whether the passed value is an array, and returns a Boolean value The constructor attribute of
the instance points to the constructor, through the constructor attribute It can be judged whether it is an array
  1. prototype chain? Which prototype chains have been used in daily use

  1. common browsers

  1. version compatible

  1. configure webpack

  1. The difference between npm and yarn

  1. Event loop mechanism

  1. es6

  1. promise

  1. The difference between react and v3

  1. The final point of the prototype chain

  1. common browsers

  1. The difference between cookie, localstorage, and sessionstorage

  1. How to do browser compatibility

  1. Where are less and sass better than css

  1. talk about cdn

Summary: On the technical side, I interviewed five or six companies, and my favorite questions are the addition of h5, c3, and es6, the difference between vue2 and vue3, and the difference between localstorage and sessionstorage

Open question:

  1. A plan for the last five years

  1. Have you read any technical books recently?

  1. What do you do if the product manager's demand is unreasonable?

  1. If you are a leader, what is your specific job like?

  1. What to do if the project is about to go live and you only finished 10% of it (you can’t finish it by yourself, others don’t have time to help you)

  1. Why choose the front end

  1. what strengths do you think you have

  1. Why come to **(city)

  1. html, css, js which do you think you learn better

Continuously updating....

Guess you like

Origin blog.csdn.net/weixin_47745553/article/details/129389748