IBM Angular Interview Questions for 5 years
Shared question set for 5 years of experience, L1 round. Topics and wording follow the supplied notes; these are questions, not official company guidance.
- Explain the event loop with execution context and call stack.
- JavaScript is single-threaded, so how does it handle asynchronous operations?
- What is a closure? Explain with an example.
- Output-based question with block-scoped let x inside an if block and an outer let x in a function.
- Output-based question with an async function that logs 1, awaits a Promise.then, schedules a setTimeout, and logs 2.
- Mask email problem: given ['john.doe@gmail.com','aem@gmail.com',undefined,'ab@gmail.com','user123@yahoo.com',null], return masked emails like 'j******e@gmail.com' and skip null/undefined values.
- What is change detection? What is the use case of OnPush?
- What is zone.js?
- If 3 widgets out of 5 are not loading in a dashboard, how will you debug it? How will you identify and fix memory leaks?
- What are Angular application performance optimization techniques?
- How will you protect an application from XSS attacks?
- How will you implement multi-layer encryption?
- What is the difference between Subject, BehaviorSubject, ReplaySubject, and AsyncSubject?
- Write code with forkJoin, mergeMap, switchMap, concatMap and exhaustMap using API calls and explain the behavior in the network tab.
- As we have RxJS, what is the need for Signals? What are the different types of Signals? When do you use the set and update methods to change a Signal value?
- What do you know about interceptors? Can we use interceptors to achieve mocking?
- Demonstrate an SCSS function, include, and mixin.