Js interview questions

2. How to add, remove, copy, create, and find node 3. Clone makes a clone of the five main Javascript data types (Number, String, Object, Array, Boolean). How to eliminate duplicate elements in an array 5. Write a function that returns closure 6. Use recursion to complete the sum from 1 to 100 7. Log (1+’2′) and console.log(1-‘2’). How to change the this pointer inside a function 12. Enumerate several ways to solve the cross-domain problem, and explain the principle 13. Write a function that clears Spaces before and after strings. If a variable is an array, let const var is an array. What is the difference between the arrow function and normal function? 19. Randomly select an integer between 1 and 10. What is the difference between XML and JSON? 25. How to implement the packaging of Webpack 26. Common web security and protection principle of 27 what design patterns used 28. Why the same-origin restrictions on 29 offsetWidth/offsetHeight, clientWidth/clientHeight scrollWidth/scrollHeight difference What methods does javascript have to define object 31? Talk about what you know about Promise 32. Talk about your understanding of AMD and CMD 33. What are the methods of session tracing in Web development 34. What built-in objects does JS have? 35. What are some basic rules for writing JavaScript? 36. How many ways can javascript create objects? 37. What does Eval do? 38. Null, undefined 39.[” 1 “, “2”, “3”].map(parseInt) 40. “Use strict” in javascript code; What does that mean? What’s the difference in using it? 41. What are the ways of js lazy loading? What is the difference between attribute and property? “ECMAScript6” “ECMAScript6” “ECMAScript6” “ECMAScript6” Common compatibility issues 47. Principle of function anti-shake throttling 48. What are the original types? Is NULL an object? Why console.log(0.2+0.1==0.3) //false 50 What are the rules for type conversion in JS? 51. What is the difference between a deep copy and a shallow copy? 52. How to judge this? The difference between == and === 54. What is a closure 55.JavaScript prototype, prototype chain? What are the characteristics? Typeof () and instanceof() 57. What is variable promotion 58. What are the internal implementations of the all, apply, and bind functions 59. Why does setTimeout countdown error occur? How to reduce the number of JS execution context stacks and scope chains What is the difference between creating an object as new and creating it as a literal? 62. What is the difference between Prototype and Proto? 63. Implement an inheritance using ES5? 65. What are the new ES6 features? There are several states of a promise. What are the advantages and disadvantages of a promise? 67. Is the Promise constructor executed synchronously or asynchronously, and then? How does promise implement then processing? 68. What is the difference between a Promise and setTimeout? 69. How to fulfill promise.all? 70. How to implement promise.finally? How to determine if img loading is complete? 73. How do I prevent default events? How to interpret JSON data when making Ajax requests 76. How to bind two onclick events to a button with native JS? 78. What is the difference between document. Write and innerHTML? 80. How do browsers render pages? 81. What is the difference between the (document).ready() method and window.onload? Is there any difference between.get() submission and $.post() submission in 82\.jquery? 83. Understanding of front-end routing? What is the difference between the front and back end routes? 84. The handwritten inheritance of class 85. XMLHttpRequest: XMLHttpRequest. ReadyState; 86. Regular expressions are often used in regular expressions

1. Convert an associated string, such as get-element-by-id, to a hump. 2. Match binary digits 3. Non-zero decimal digits (contain at least one digit but cannot start with 0) 4. Match 12 months in a year. 5. Match the longest QQ number 13. 6. Match the IP address 8. Match the string 9 beginning with a enclosed in Angle brackets. Split the number three by a comma 10. Check whether the string contains the number 11. Determine whether the phone number complies with the specified format 13. Determine whether the phone number complies with the specified format 14. Obtain URL parameters 16. Verify email 17. Verify ID number 18. 20. Check whether the date format conforms to the form ‘2017-05-11’, simple judge, only judge format 21. Check whether the date format is consistent with ‘2017-05-11’. 22.IPv4 address is regular 23. Hexadecimal color regular 24. License plate regular 25. Filter HTML tags 26. The password strength is regular and contains at least six characters, including at least one uppercase letter, one lowercase letter, one digit, and one special character 27.URL is regular 28. Matching floating point

Browser/HTML/CSS interview questions

1. What is box model? 2. What are block-level elements? What are the void elements? What is the difference between an inline element and a block-level element? 3. Describe the difference between SRC and href 4. What is elegant degradation and progressive enhancement 6. The difference between PX and EM 7. Why HTML5 only write 8. How to complete an HTTP transaction 10. How to implement encryption 11. How do browsers render pages? 12. What is the browser’s core? What is the difference between using link and @import when importing pages 14. How to optimize images, image format differences 15. List the new features you know about Html5. Css3 16. How can CSS3 animation render be optimized? Listing several front-end performance optimizations 18. How to implement communication between multiple tabs in the same browser 19. What are the storage technologies of the browser? 20. CSS positioning methods 21. Method of vertical up-down middle 23. Principle of responsive layout 25. Method of clearing float 26. How to optimize the files and resources of the website 29. Your understanding of the importance of web standards and W3C 30. The difference between Http and HTTPS 31. Data – The role of properties 32. How to make Chrome display text less than 12px 33. What actions cause page Reflow 34.CSS preprocessor comparison less sass 35. How to clear the page cache every time a page is opened 36. HTTP request methods and differences 39. What does the front end need to pay attention to SEO 40. Enter url from browser address bar to display page step 42. How to Optimize website performance 43. 44. How to use HTML5 offline storage, can you explain the working principle? 45. How do browsers manage and load HTML5 offline storage resources? 47. What are WEB standards and W3C standards? 48. The Doctype? How to distinguish strict mode from promiscuous mode? What do they mean? 50. What is the difference between Canvas and SVG? 51. How to create a circular clickable area on a page? 53. Please describe the difference between cookies, sessionStorage and localStorage. 54. What are CSS selectors? Which attributes can be inherited? 55. How to calculate the CSS priority algorithm? 56. What are the new features of CSS3? 57. Please explain the FLExbox (flexible box layout model) of CSS3 and the applicable scenario? 58. What is the principle behind creating a triangle with pure CSS? 59. Common compatibility issues? 61. What is the difference between an absolute containing block and a normal flow? 62.CSS visibility property has a collapse value? What’s the difference between different browsers? 63. Display: None and visibility: hidden 64. What happens when position is superimposed on display, overflow, and float? Understanding of THE BFC specification (block formatting Context)? 66. Why does a float occur and when does it need to be cleared? How to clear the float? 68. What is the display value of the element after setting the float? 69. Have you used media query for mobile layout? 70. What are the ways to optimize and improve CSS performance? 71. How do browsers parse CSS selectors? 72. Should I use odd or even fonts on web pages? Why is that? 73. Which scenes are suitable for margin and padding? 74. Is the vertical percentage of the element set relative to the height of the container? 75. How does full-screen scrolling work? What CSS properties are used? 76. What is responsive design? What are the fundamentals of responsive design? How to compatibility with earlier Versions of IE? 77. Parallax scrolling effect? 78. What is the difference between a double colon and a single colon in ::before and :after? Explain the function of these two pseudo-elements 79. How to make the font on the page clear and thin with CSS? 80. position:fixed; How to deal with invalid under Android? 81. If you need to write animation manually, what is the minimum time interval you think, and why? 82. What causes the invisible space between Li and Li? What’s the solution? 83. Display: When does inline-block display a gap? There are two divs inside, one of which is 100px high, and the other is expected to fill the remaining height 85.png, JPG, GIF. Have you heard about WebP? 86. What is the difference between writing the style tag after body and before it? 87. The CSS property overflow property defines what happens to the contents of the overflow element content area. CSS Sprites 89. One or more lines of text beyond hiding