• The CSS and HTML
Font -- size:20px; the height of the A element should always be 50% of the width of the A elementCopy the code

	<div class="box"> <div class="Abox"</div> </div> *{padding:0; margin: 0; } html,body{ width: 100%; height: 100%; } .box{ position: relative; background: red; width: 100%; height: 100%; } .Abox{ margin-left:10px; width: calc(100vw - 20px); height: calc(50vw - 10px); position: absolute; background: yellow; top:50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; font-size: 20px; } The height of element A is always 50% of the width of element ACopy the code
  • Function arguments

Is arguments an array in a function? How do I convert an array?Copy the code

This is a simple array. From… Argument.argument.argument.argument.argument.argument.argument.argument.argument.argument.argument.argument.argument.argument.argument I’m just saying for a second…

function cc () { 
    console.log(Array.from(arguments))
    console.log([...arguments]) 
 }
Copy the code

  • Iii. The following printed results

    if([] = =false){console.log(1)};
    if(= = {}false){console.log(2)};
    if([]){console.log(3)}
    if([1]==[1]){console.log(4)}
Copy the code

This one is also a little bit easier 1, 3 learning == and conversion is not a problem

1 and 2 are converted to numbers. 3 is converted to Boolean. 4 Addresses are differentCopy the code

  • Iv. Print results below
async function async1(){ console.log('async1 start') await async2() console.log('async1 end') } async function async2(){  console.log('async2') } console.log('script start') setTimeout(function(){ console.log('setTimeout') },0)  
 async1();
 new promise(function(resolve){
    console.log('promise1')
    resolve();
 }).then(function(){
    console.log('promise2')
 })
 console.log('script end')Copy the code

This is also simple: Promises take precedence over setTimeout microtasks and macros

script start
async1 start
async2
promise1
script end
promise2
async1 end
setPromise2 and async1 end interchangeasyncfunction asyncFunc() { const result = await otherAsyncFunc(); console.log(result); } // equivalent to:function asyncFunc() { 
   returnotherAsyncFunc().then(result => { console.log(result); }); }Copy the code

  • 5. Change error
This and thisletThe problem ofCopy the code

This one just changedletI said arrow function doesn't have this and this only goes out and he said no this, where does this come from and I didn't say, Ask again this is to declare to determine or perform certain I think this is outside of this statement to determine or to determine what relationship In the interviewer's guided me unexpectedly answer is performed to confirm again and again, because I think is the time to perform the outside this really is a problem that, in fact, this is inherited, I just forgot it. The interviewer's words come across as very aggressive, which makes you doubt yourself. Oh, you have to be strong. Oh, my godCopy the code
  • Six, write the bind

thisbindI read it on the Internet several times and thought I understood the handwritten code. In fact, some of them were found after searching the Internet and missing a line. They killed themselves and then they were questioned. 233333333Copy the code
  • 7. Function throttling (this problem has a hole)
From the diagram, it is about 100ms to prevent the function from running. I think such a simple problem can be solved. I want to study it carefully. I've found that a lot of questions die when askedCopy the code
  • 8 · Select N numbers from an unordered and unequal array and make the sum equal to M to implement the algorithm

This I see the wrong topic Make it and for M algorithm as a summation, ha ha ha ha ha ha ha ha Actually even don't see the wrong topic, I couldn't write by hand This you have to be at the edge of the machine, try to write out Finally asked several projects, how to promote said go to see you don't know the js (all know asking was well ah, Some things don't don't know) then he said don't know let you too or hahahahahahahaha finally hung up, he said to have a good look at vue source interview officer long very small only, he buckled very dead, often said: are you sure you can write? I, I, I... Mentality can not lose, can!! After two hours, the interview is over. Compared to meituan interviewers, Little Brother Toutiao is good.Copy the code

After the interview, I went to Meituan immediately. Maybe IT was because meituan little brother gave me a good feeling last time. The interviewer's quality was so low that he was one of the worst interviewers I have ever seen. I guess what she's doing is security asking encryption algorithms what's going on with HTTPS, is it really secure? DNS hijacking? How can localhost not be tampered with? Yeah, it's all about security and finally if YOU look at your resume, you've only been there a year and a half. I have too little experience. You should take this resume by yourself, or keep it and I will not send it. Go out by yourself, but as a result, I even have no key card and can't go out. It was very rude of you to send me away for ten minutes, so why did you send me? I came all the way here to give you 10 minutes. It's getting dark. Go home.Copy the code

Thank you, technology has no peak, to maintain continuous efforts, learn endless, the interview question is not enough to judge a person’s real ability, we come together ヾ(◍°∇°◍) Blue