Why verify OpenAPI/Swagger schemas or shared TypeScript DTOs cleanly alongside backend changes? A Prevents silent frontend/backend contract drift where renamed fields break production UI cleanly without compile warnings B Eliminates unit tests C Replaces PostgreSQL tables D Encrypts API URLs
Q2 Browser Fundamentals Intermediate What does requestAnimationFrame(cb) guarantee over setTimeout(cb, 16)? A Runs right before the browser repaints the next display frame (60Hz/120Hz synced) and pauses in background tabs B Always executes in 16ms exact C Bypasses microtasks D Runs on a Web Worker thread
What distinguishes Authentication (`401`) from Authorization (`403`) in REST endpoints? A 401 means database offline B Authentication verifies WHO you are (valid JWT); Authorization checks WHAT you may access (role/ownership) C Both mean wrong password D 403 triggers token refresh
Q4 Browser Fundamentals Advanced How does SameSite=Strict differ from SameSite=Lax on cookies? A Lax allows cross-site POST requests B Strict disables HTTPS C Both block same-origin requests D Strict never sends cookie on cross-site navigations; Lax sends on top-level safe GET navigations (external links)
What creates a new stacking context in CSS? A transform: translateX(0), opacity < 1, or isolation: isolate B display: block C margin: 0 auto D color: inherit
Which HTML element pairs with <figure> to provide a semantic caption? A <caption> B <summary> C <legend> D <figcaption>
What does loading="lazy" do on an off-screen <img> element? A Preloads image at highest priority B Compresses JPEG bytes automatically C Defers fetching image bytes until it nears the viewport D Caches image inside localStorage
Why prefer `npm ci` instead of `npm install` inside automated GitHub Actions pipelines? A Ignores package.json scripts B Enforces strict exact versions from `package-lock.json` cleanly (deleting stale node_modules) without altering lockfiles C Installs devDependencies silently into browser D Requires global yarn
What does React Server Component Payload (RSC Flight Format) stream during App Router soft navigation? A Compressed PNG snapshots B Lightweight serialized tree instructions for rendered Server Components + Client Component chunk references — updating UI seamlessly WITHOUT wiping client component state! C Full duplicate `<html><head>` document reloads D Raw SQL rows directly
Q10 Browser Fundamentals Beginner What happens during Event Bubbling in the DOM? A An event starts on the target element and propagates upward through parent elements toward window B Events travel only from window down to target C Two elements fire asynchronously via WebSocket D Bubbling clears form inputs
What does `const [first, ...rest] = [10, 20, 30, 40]` bind to `rest`? A [20, 30, 40] B 40 C undefined D 20
When writing `@Input()` / `input.required<User>()` or strict class props, why avoid excessive non-null `!` assertions (`user!.name`)? A Browsers cannot parse `!` B `!` triggers runtime freezes C `!` only silences the compiler without adding any runtime check, hiding real null crashes D `!` turns strings into numbers
Why use PostgreSQL connection pooling (`pg.Pool` / Prisma adapter-pg) instead of opening a fresh TCP DB connection per HTTP request? A Deletes unused tables B Stores DB rows inside Chrome C Bypasses SQL indexes D Reuses established TCP+auth connections cleanly, avoiding TCP/TLS handshake overhead and DB connection limit exhaustion under load
How does Angular `DestroyRef` + `takeUntilDestroyed()` cleanly eliminate Observable/interval memory leaks? A Pauses browser tab audio B Automatically unsubscribes active RxJS subscriptions and runs cleanup callbacks cleanly when the component destroys C Resets reactive form strings D Retries failed HTTP POSTs
Q15 Express.js Intermediate In Express `authenticate` middleware, what HTTP status cleanly distinguishes unauthenticated vs unauthorized (wrong role)? A 401 Unauthorized (missing/expired/invalid JWT) vs 403 Forbidden (valid login, lacking ADMIN permission) B Both always return 404 C 400 vs 200 D Both return 500