Interview Questions

Answer: Event delegation involves assigning a single event listener to a common ancestor instead of attaching listeners to individual elements. This is useful for dynamically added elements.
Answer: Media queries allow styles to be applied based on device characteristics. They use the @media rule to conditionally apply CSS rules.
Answer: Both provide a way to store data on the client-side. \"localStorage\" persists data across sessions, while \"sessionStorage\" stores data for the duration of a page session.
Answer: The same-origin policy restricts web pages from making requests to a different domain for security reasons, preventing potential security vulnerabilities.
Answer: Use modular and component-based CSS architecture, leverage preprocessors like Sass, and follow a naming convention like BEM (Block Element Modifier).
Answer: Use the position: sticky; property on the header element. This keeps the header positioned relative to the viewport until a specified point is reached during scrolling.
Answer: Both \"localStorage\" and \"sessionStorage\" provide a way to store key-value pairs on the client side. \"localStorage\" persists data across sessions, while \"sessionStorage\" is session-specific.
Answer: Sass offers features like variables, nesting, and mixins, promoting code reusability, maintainability, and organization in stylesheets.

Join Thousand of Happy Students!

Subscribe our newsletter & get latest news and updation!