- What are
data-attributes good for? - Describe the difference between
<script>,<script async>and<script defer>. - Why is it generally a good idea to position CSS
<link>s between<head></head>and JS<script>s just before</body>? Do you know any exceptions? - Why you would use a
srcsetattribute in an image tag? Explain the process the browser uses when evaluating the content of this attribute. - What is the difference between
canvasandsvg? - What is progressive rendering?
- Describe z-index and how stacking context is formed.
- What are the different ways to visually hide content (and make it available only for screen readers)?
- What is CSS selector specificity and how does it work?
- Describe pseudo-elements and discuss what they are used for.
- What does
* { box-sizing: border-box; }do? What are its advantages? - Explain your understanding of the box model and how you would tell the browser in CSS to render your layout in different box models.
- What's the difference between inline and inline-block?
- What's the difference between the "nth-of-type()" and "nth-child()" selectors?
- What's the difference between a relative, fixed, absolute and statically positioned element?
- What existing CSS frameworks have you used locally, or in production? How would you change/improve them?
- Have you ever worked with hi-dpi (e.g. retina) graphics? If so, when and what techniques did you use?
- Is there any reason you'd want to use
translate()instead of absolute positioning, or vice-versa? And why? - Can you explain the difference between px, em and rem as they relate to font sizing?
- Can you give an example of a pseudo class? Can you provide an example use case for a pseudo class?
- What is the difference between CSS Grid and Flexbox? When would you use one over the other?
- Describe BFC (Block Formatting Context) and how it works.
- Explain how
thisworks in JavaScript.- Can you give an example of one of the ways that working with
thishas changed in ES6?
- Can you give an example of one of the ways that working with
- Explain how prototypal inheritance works.
- What's the difference between a variable that is:
null,undefinedor undeclared?- How would you go about checking for any of these states?
- What is a closure, and how/why would you use one?
- What language constructions do you use for iterating over object properties and array items?
- Can you describe the main difference between the
Array.forEach()loop andArray.map()methods and why you would pick one versus the other? - What's a typical use case for anonymous functions?
- Explain the difference between:
function Person(){},var person = Person(), andvar person = new Person()? - Explain the differences on the usage of
foobetweenfunction foo() {}andvar foo = function() {} - Can you explain what
Function.callandFunction.applydo? What's the notable difference between the two? - Describe event bubbling.
- Describe event capturing.
- What is the difference between
==and===? - Explain the same-origin policy with regards to JavaScript.
- Explain the difference between mutable and immutable objects.
- What is an example of an immutable object in JavaScript?
- What are the pros and cons of immutability?
- How can you achieve immutability in your own code?
- Explain the difference between synchronous and asynchronous functions.
- What are the differences between variables created using
let,varorconst? - What advantage is there for using the arrow syntax for a method in a constructor?
- What is the definition of a higher-order function?
- Can you give an example for destructuring an object or an array?
- What are the benefits of using
spread syntaxand how is it different fromrest syntax? - What is a promise? Where and how would you use promise?
- [advanced] Can you give an example of a curry function and why this syntax offers an advantage?
- What is state in React?
- What are props in React?
- What is the difference between state and props?
- Why we need to pass a function to setState()
- [advanced] What is the purpose of callback function as an argument of setState()?
- What are inline conditional expressions?
- What is "key" prop and what is the benefit of using it in arrays of elements?
- What is the use of refs?
- How to create refs?
- [Advanced] What are forward refs?
- What is Virtual DOM?
- [Advanced] What is the difference between Shadow DOM and Virtual DOM?
- What is the difference between createElement and cloneElement?
- What are the different phases of component lifecycle?
- What are the lifecycle methods of React?
- What is context?
- What is children prop?
- what is the difference between an array and a map?