Skip to content

Instantly share code, notes, and snippets.

@aakash14goplani
Last active September 17, 2022 14:59
Show Gist options
  • Save aakash14goplani/b240b1013ba5f4eef59d4dc687fd2358 to your computer and use it in GitHub Desktop.
Save aakash14goplani/b240b1013ba5f4eef59d4dc687fd2358 to your computer and use it in GitHub Desktop.
Interview Questions

I started searching for new opportunities as Mid-Senior Angular Developer from 20th May 2022. This would be my first ever switch. In span of 3 months, I have interviewed with 38 companies (mostly service based and not-so-famous product based). Here is the list of questions that were asked.

JavaScript
HTML
CSS
Design Patterns
TypeScript
Angular
Coding


JavaScript

  1. Objects

    • What and why
    • compare two objects
    • ways to create object
    • shallow vs deep copy
    • immutability (how can we achieve that)
  2. Scopes and Variables

    • Scope
    • Hoisting
    • Scope chaining
    • IIFE
    • Closures
  3. Context

    • this keyword and its behaviour in multiple scenarios
    • call / bind / apply
    • regular functions vs arrow function
  4. Async

    • async / await
    • async programming using iterator / generator
    • Promises
    • Callbacks
  5. OOPS

    • Classes
    • Prototypes & Inheritance
    • constructor, extends, static, public, private
  6. Types and Equality

    • Different primitive and reference types and how are they stored in memory
    • == && ===
    • Auto type conversion in JavaScript
    • NaN and isNaN
  7. Web API

    • setTimeout / setInterval
    • Event Loop, Macro and Micro task queues
    • Storage API: Local, Session, IndexedDB, Cookies, Caching
    • Web Workers and Service Workers (steps to create service workers)
    • Garbage Collection process
  8. Miscellaneous

    • Data Structures: Set, WeakSet, Map, WeakMap, Stack and Queue
    • Recursion
    • Currying
    • Event bubble, capture and delegation
    • Latest ECMA version with new features, ES5 vs 6 vs 7 and so on...
    • How to debug: code and event breakpoints
    • Browser rendering behaviour and performance

HTML

  1. Semantic Tags
  2. Pseudo Elements and pseudo selectors
  3. Importance of META tags
  4. Shadow DOM
  5. Importance of DOCTYPE
  6. AMP HTML

CSS

  1. Alignment properties
  2. Box Model
  3. Flexbox or Grid (I prefer Flexbox)
  4. Position properties
  5. Block vs inline vs inline-block vs flex
  6. display vs visibility
  7. specificity order
  8. how to debug CSS
  9. pixel vs em vs rem
  10. Steps for converting existing non-responsive site to responsive
  11. SCSS
  12. BEM
  13. Media Queries (with various jargons like landscape, portrait etc)
  14. Box model vs flex model

Design Patterns

All of below implement with examples

  1. Observable
  2. Modular (Common / UMD / AMD / IIFE)
  3. Singleton
  4. Factory
  5. OOPS concepts
  6. SOLID principle

TypeScript

  • When to create Interface vs Enums vs Abstract Class
  • Tuples
  • Any vs Unknown
  • Generic functions

Angular

  • Ivy working and advantages
  • Ivy vs ViewEngine
  • Explain Dependency Injection (explain hierarchial injector mechanism, useCalss, useValue, useFactory, Host, Self, Skipself, Optional)
  • Explain Change Detection (ngZone, default, onpush, detectChanges, markforCheck, detach, reattach)
  • Observables vs Promises
  • Unicast vs Multicast
  • Types of Subjects and use cases
  • RxJs operators that you have used frequently
  • Higher order mapping RxJs operators - MergeMap, ContactMat, ExhaustMap and SwitchMap
  • forkJoin vs combinedLatest vs withLatesFrom vs zip
  • Lazy Loading and associated strategies
  • Location strategies
  • Router vs ActivatedRoute
  • Marble diagrams
  • JIT vs AOT
  • Types of Directives
  • Services and multiple methods involved to provide them
  • Life cycle hooks
  • Router life cycle
  • expressionchangedafterithasbeencheckederror - cause and fix
  • other types of angular specific errors - cause and fix
  • cyclic dependency - cause and fix
  • NgModule vs JS Module
  • Template Driven Form - focus on ngModel
  • Reacive forms - ControlValueAccesor and create a custom validator function
  • Security best practices
  • How to avoid performance bottleneck & improve performance
  • Angular Dev tools and how to use them
  • Update base-href dynamically
  • Route reuse strategy
  • javascript expression vs angular expression
  • scopes in angular
  • ng-container vs ng-template vs ng-content
  • view-children vs content-children
  • state management
  • unit testing using jasmine / jest
  • importance of files generated post build (main, vendor, polyfill, styles, scripts, lazy-loaded-bundles)
  • Angular CLI commands that you use frequently
  • tsconfig and angular.json - importance?
  • How to bootstrap multiple modules?
  • App Initializer and where have you used that?
  • How to upgrade angular from lower versions to latest one (explain detail procedure and stps to be taken)
  • When to use onpush and when to stick with default?
  • Decision between making reusable components vs dynamic components?
  • Basics on SSR and Angular custom Library

System Design

  • Lift (Elevator)
  • Coffee Vending Machine
  • Dynamic Forms (available tools - Angular, AWS and Web API)
  • Dashboard (should work smoothly on lower end devices and slow n/w)
  • Feature Flags
  • Reusable components (accordion, modals - should be customizable and reusable by any framework / library)

Coding

  1. JavaScript

    • Array - questions involving map, filter, reduce, sort (custom comparator), flat, copy
    • Objects - deep clone, flatten nested object, find cycles
    • Polyfills - map, reduce, filter, flat (recursive and iterative), Promise.all
    • Fibonacci Series (generate till n, return nth value)
    • Prime Number generator (generate till n, return nth value)
    • Currying: multiply(1)(2)(3)(), sum(1)(2,3), sum(1,2,3)
    • 2sum
    • Group anagrams, check if anagram, remove anagram
    • longest substring, return len. of largest common subsequence of two strings
    • Debounce and Throttling (with and without setTimeout)
    • Memoize function
    • Group properties from array (just to test your concept around groupby method)
    • Integer to Roman and vice versa
  2. Angular

    • Timeout feature (logout user after inactivity) using RxJs
    • delay with retry n times using RxJs
    • Modal using Dynamic Components
    • Reactive forms with error handling
    • Create custom Observable and operator
    • Custom pipes with multiple arguments and chain
    • Fix broken unit test cases
    • Create Auth Guard
    • NgRx (create simple store, reducer, action and effect)
    • Custom Attribute directive and use HostListener and HostBinder
    • Various techniques of component Communication
    • fetch data from dummy endpoint and display in HTML with async pipe
  3. HTML / CSS / Vanilla Javascript

    • Carousel
    • Destroy all timeouts and intervals
    • search box with debounce
    • listing page like amazon
    • hamburger icon
    • responsive nested navigation bar
    • multi select dropdown
    • Accordion with customization to add icons and test dynamically
    • Type ahead
    • tooltip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment