The front end of the internship interview summary

Recently been to look at the book-based multi-code code is ready to find internships, the Internet has been collecting a lot of faces, now collecting the intern to face questions themselves tidy.

Topic Source: front-end summary intern interview
recently started several interviews, although not yet know the outcome, but still have to conduct a summary record, also hope to face interns are preparing to help children's shoes ~

JavaScript

  1. addEventListenerThe last argument is what to do with?
    A: The event is a bubbling or capture requirements. false to call an event handler for the bubbling phase, true indicates that the call handler for the event in the capture phase. ( removeEventListener()The same)

  2. What is bubbling, what is captured?

    A: When an element is bubbling trigger an event after the transfer will be like until the upper document (accepted by the most specific elements, and then progressively spread upward to not more specific node (document)). Capture is less specific node (file document) received earlier event, and specific node last received event.

  3. All events are bubbling it?
    A: No, blur, focus, load, unload , abort not bubble (each event has a event.bubbles property, you can know whether it bubbling to see the details. Browser which events bubble? )

  4. How to cancel the event bubble
    A: My answer here is wrong, correct me thank the great God, we should not confuse it
    eve.preventDefault(the default behavior to cancel the event, if cancelable is true, you can use this method, cancelable attribute indicates whether the event's default behavior can be canceled ). eve.stopPropagation()is used to cancel the event of further capture or bubbling, when bubbles is true, you can use this method.

  1. How judgment is not an array

    A: a instanceof Array Array.isArray(a)He asked what I have -
    I say try Array of built-in functions, you can use Array is not is not, in fact, thereObject.prototype.toString.call(a)=== '[object Array]'

  2. How to put a class array object into an array of
    A:Array.prototype.slice.call(arrayLike);

  3. Talk about inheritance
    A: Inheritance is a form of code reuse can significantly reduce software development costs too. In JavaScript, inherited three ways: class inherits formula (mainly), the prototype inheritance of formula (major) and doped metaclass.
    Class type Inheritance: first create a constructor that calls the superclass constructor in the constructor, and pass parameters to it. Then set the next prototype chain, manually subclass prototype to an instance of the superclass (Author.prototype = new Person ()) , then the prototype class constructor property reset to handle subclass (Author.prototype. constructor = Author).
    Prototypal inheritance: to define the structure of the object does not need to use the class, just to create a prototype object directly, the object can then be reused new object. Mainly on the superclass be a shallow or that is in charge of cloning, the cloning function is as follows

    functon clone(o){
        function F(){}
        F.prototype = o;
        return new F();
    }

    After cloning superclass, you can redefine this clone methods and properties, can modify the default values provided by the superclass can add new attributes and methods. However, this method for members inherited from the prototype object, which read and write inherently unequal sex. For details, please refer JavaScript inheritance

  4. Array What are way to die?
    A:. Concat, join, pop, push, reverse, shift, slice, sort, splice, unshift ( "JavaScript language essence," a book summed up the arrays, functions, numbers, regular expressions, string commonly used method)

  5. sort method works is what?
    A: The default comparison function to sort the elements are to be treated as a string, the comparative figures have time, will be converted to string figures are then compared.

  6. If you want to sort that sort of digital how to do?
    A: n.sort(function (a,b) {return a-b;})Ascending

  7. String What are some ways to die?
    A: concat charAt slice substr substring, etc. (In fact, think we should add that string is said that the basic data types, there is no way, string method is a method reference type String constructor creates the ~)

  8. Replace that method of how to use it?
    A: string.repalce(searchValue,replaceValue)for string search and replace operations and returns a new string parameter searchValue can be a string or a regular expression object, if it is a string, then place in searchValue only the first occurrence is replaced . If searchValue and is a regular expression with the identification g, all matches will be replaced.

  9. Mouse over an element appears a pop-up layer
    A: on dom 0 stages, for example if the child is onmouseover dispaly: block

  10. Fast sliding the mouse would not let him appear how to do
    A: setting a setTimeout when the mouse stays on top in less than a set time, then he has not come out of the event to be canceled

  11. That should set the setTimeout how long time? I do not know what this convention setting time, if I were you, you should go back and try to see that the time is right

  12. Now I want this element in the bottom of the page is a pop-up layer above the display elements in the layer above the pop-up is displayed at the bottom? Positional distance determination bottom of the page elements, then the pop-up position is greater than the height of the layer just below the pop, pop or above

  13. If I want him to make a tool for others to use to how to do? Uh - the first to use modular, pay attention and do what other ways there is a conflict, then the sub-ah which set out the method parameters required, such as that element, what events, and so the size of the popup

  14. That argument certainly want to do a lot of good tools, how can you facilitate others to use it? After all parameters are so many people will not remember uh - I might set a target, the incoming object attributes, thus easy to remember.

  15. Event Agent
    A: Details are JavaScript event and commission agents

  16. What is what is bubbling capture
    A: Details are JavaScript event and commission agents

  17. C++

  18. jQuery get to the elements and native elements to take Js What is the difference
    jQuery acquired element returns a jQuery object, it is a class array of objects, properties, 0,1,2 ... in deposit with the found DOM objects, the jQuery object has a length property, which is found in the number of DOM. js element is taken to the DOM element.

  19. The role of Doctype
    A: Yes parsing the document type declaration (<DOCTYPE!> document.compatMode), Which indicates the web browser on the page using HTML version were written instruction to avoid browser quirks mode. For details, see: About DOCTYPE

  20. Responsive I answered only @media

  21. The difference between setTimeout and setInterval
    details see: setTimeout () and setInterval ()

  22. setTimeout time is set to 0 if executed immediately, and why?
    Not necessarily, because JavaScript is a single-threaded interpreter, so within a certain time you can only execute a piece of code. To control code to be executed, there is a JavaScript task queue. setTimeout time is set to 0, it is 0 milliseconds after telling JavaScript to add the current task to the task queue. If the queue is empty, the code will be executed immediately added; if the queue is not empty, then it is to wait for the previous code execution after their execution.

  23. Operating mechanism constructor

  24. this binding

  25. The difference between call () and apply () of

  26. Js inherit what? What kind of prototype inheritance

  27. Modular explain, for example modular approach

  28. The difference between GET and POST

  29. Difference between function declarations and function literals

  30. jQuery What are the benefits of cascade

  31. Progressive Enhancement graceful degradation

CSS:

  1. float height collapse Solution:
    clearfix: after {the Clear: both-; Content:; height. "": 0; Run the display: Block; visibility: hidden;} (dug ourselves a hole after a pseudo-element is not a pseudo-classes, I say wrong ~)

  2. line-height calculation units and the percentage of pixels units: length set a fixed line spacing. Unit em, px, pt, and so on. Percentage%
    , the percentage based on the current line spacing of the font size. (I think my answer was right, but he repeated it again: I'm talking about line-height)

  3. There are a number of ul li, li want each has a border-bottom, the last one does not want to boder-bottom li how to do: (ul: last-child {border-bottom: none;} or to the last li add a class selector to set border: none; (he says there, check what jQuery can be loaded like ~)

  4. css selector determines how long his priority: inline style 1000 - id100 - class, pseudo-class, attribute selector 10 -
    type selector, a pseudo-element selector calculated by adding a large high priority, high priority values are equal, then the statement.

  5. A vertically centered div how it? Hungry yet said the ~

  6. What are your favorite css3 property, you know? Animation transform transmation border-radious box-sizing box-shadow

  7. A long passage to the interception, after more than three points is how to do? Not considered compatible if there CSS3 text-overflow: ellipsis then either overfloww: hidden point is added a three-side frame span before or pseudo elements: after {content: "..."} like the bars

  8. position positioning

  9. dom operating elements

  10. Two-column layout

  11. inline-block gap how to solve

  12. How to tile a background image? css: Set a picture {position: absolute; top: 0; left: 0; bottom: 0; right: 0; z-index: -1;} js method of: determining the height of the browser, the picture height is provided

  13. If you let the picture scaled reduce it? Js is determined by the width and height, and then scaled (interviewer said screen panels are horizontal screen, the width is set to 100% on it)

  14. css hack

  15. Conditional comments

  16. The value dispaly

  17. css3 animation performance optimization What do you know? I only answered best not to use all

  18. BFC, what haslayout is how to trigger

HTML

  1. What is semantic

  2. html5 semantic tags

HTTP

  1. http status codes are aware that

Algorithm (a no answer it):

  1. Priority Queue

  2. stack

  3. Quick Sort

  4. Deduplication Array

  5. How a tree structure

  6. Decimal number to determine how many bit binary code

project

  1. css3 open book is how to do it? Barabara about a bunch of

  2. The page you have a bug ah, how to change what causes it? z-index problem, how to change ~ Phuket

  3. canvas drawing how to do it? Barabara about a bunch of

  4. You draw a bug in it, how to change what causes it? Scrollbar problem, how to change and Phuket. . . (Plus scroll bar distance, the interviewer told me ~)

version control

  1. Learn what version of the controller? Understand some github

  2. The basic operation will it? I have carried out the operation with the windows graphical interface (interviewer hearts may have ten thousand mud horse in a gallop ....)

  3. What works github is it?
    I put my code on github uploaded to the warehouse, then others can download the updates and then upload the code to add the warehouse, I can then download the updated continue to add modifications

  4. That if two of you to modify the same code conflict how to do? I know the only way to roll back, and his teammates is the exchange code to see who is more important, then a rollback operation.

  5. Only so what, you must have a human sacrifice?
    I learned github function is actually very strong, so there must be a better way to do this, but I now use github limited to storage, and some minor modifications their own code, so do not know a better way. . . .

other

  1. What are your favorite coding tool? sublime text

  2. You have to modify a lot in common how to do? Press Ctrl + D select a plurality of selected and then changed with

  3. How to photoshop? It can be a simple graph ps psd page does not figure landscape beautification

  4. Want to export a document referred to png how do smaller storage format used for web. . . (Should not ~)

  5. Learn how to optimize performance

Project (here a long chat)

  1. Tell me something about what projects you have done it? Barabara bunch of no specific answer -

  2. How did you cooperate team project it? Barabara bunch of no specific answer -

  3. You learn what it is now? Linux, Qt development barabara ~ ~ ~

  4. Do not see the front end of useful C ++, you have to learn from him what is the use? I do not just write a front end, I was a programmer, C and C ++ are the basis of these languages, it is Bala Bala ~

  5. You most satisfied with the C ++ program to talk about? Qt ah, ah ~ What kind of ~

  6. Do you think Taobao Home What are the technical advantages?
    Large page, there are many things to carry, but allows users to find what they want to find a clear proof of the layout do very well, and which includes image carousel ah ah what a click event in a lot of events, so avoid conflicts event is also very tired harm ~

  7. What do you feel you can write with a long Taobao Home? Uh ~ For a week (this can be really do not know what the right answer)

  8. Why do you want to come Taobao Technology? Because the technology cattle, and there are many large cattle in this team, if I had the chance to become a member if employment can learn more things friends ~

  9. Do you think you have what advantage can be Taobao Technology? Hey, do not tell you is how I answer was ~~

Guess you like

Origin www.cnblogs.com/baimeishaoxia/p/12609632.html