Front-End Web Development Quizzes
JavaScript Quiz: Event, Code & Properties
JavaScript Quiz: Event, Code & Properties: interactive 136-question quiz. Answer one question at a time and share your result.
This quiz tests your understanding of Angular selectors, pseudo-classes, structural directives, and common development challenges. It's designed for front-end developers looking to sharpen their Angular skills.

switchMap, concatMap, and mergeMap.:host and :host-context() Pseudo-Classes:host pseudo-class selector targets the element that hosts the component. This is useful for applying styles directly to the custom HTML tag that represents your component. For example, if your component is <app-my-component>, :host styles this <app-my-component> tag.
The :host-context() pseudo-class selector targets styles based on conditions in the component's ancestors. It allows you to apply styles to the host element if a specific CSS class or attribute is present anywhere up the DOM tree from the host element. This is particularly useful for theme-based styling or adapting component appearance based on its environment.
*ngIf and *ngFor, are powerful tools for shaping the DOM by adding, removing, or manipulating elements. When creating your own structural directives, you often face decisions about how to hide or remove elements. Understanding the implications of each approach—such as using display: none versus removing an element from the DOM entirely—is key to optimizing performance and managing memory.
ExceptionService or LoggerService, ensures they are instantiated once and shared correctly across the application. This prevents multiple instances and maintains consistent behavior.
switchMap, concatMap, and mergeMap are used to transform and combine observable streams. Each operator has distinct behavior regarding how it handles concurrent emissions and subscription management. Knowing when to use each one is critical for managing asynchronous operations effectively.
:host and :host-context().:host pseudo-class selector targets the element that hosts the component itself. It allows you to apply styles directly to the custom HTML tag that Angular generates for your component, rather than to elements inside its template. This is useful for component-level styling and layout adjustments.*ngIf modify the DOM's structure by adding or removing elements. When *ngIf evaluates to false, the element and its descendants are completely removed from the DOM. When it evaluates to true, they are re-inserted. This differs from simply hiding elements with CSS, which keeps them in the DOM.AppModule or use { providedIn: 'root' }.switchMap cancels previous inner observables if a new source value arrives before the previous one completes, ensuring only the latest result is processed. mergeMap, conversely, subscribes to all inner observables concurrently, allowing multiple inner observables to run in parallel. Choose based on whether you need to abandon or process all concurrent operations.JavaScript Quiz: Event, Code & Properties: interactive 136-question quiz. Answer one question at a time and share your result.
Front-end build tools Quiz: Grunt, Online & Casino: interactive 30-question quiz. Answer one question at a time and share your result.
CSS Quiz: Responsive, Benefits & Disadvantages: interactive 72-question quiz. Answer one question at a time and share your result.