11. Black box vs White box testing — what’s the difference?
⦁ Black box testing checks functionality without knowing internal code—tests inputs and outputs.
⦁ White box testing involves testing internal structures, logic, and code paths.
12. Biggest trends in web development?
Trends include Jamstack, serverless architectures, Progressive Web Apps (PWAs), headless CMS, AI integrations, and using frameworks like React, Vue, and Svelte.
13. Differences between mobile and desktop web development?
Mobile focuses on smaller screens, touch interactions, slower networks, and resource constraints, while desktop allows more complex layouts, hover states, and faster processing.
14. What is push technology and its pros/cons?
Push technology sends data from server to client proactively (e.g., WebSockets).
Pros: real-time updates, better user engagement.
Cons: resource-intensive, complexity in handling connections.
15. How to implement integer division if not available?
Use floor division:
let intDiv = Math.floor(a / b);
16. How to vertically and horizontally center an element with CSS?
Simplest in modern CSS:
{
display: flex;
justify-content: center; /* horizontal */
align-items: center; /* vertical */
}17. How to improve page load speed?
Optimize images, minify CSS/JS, leverage browser caching, lazy load assets, use CDNs, and reduce HTTP requests.
18. What’s the Virtual DOM in React?
A lightweight copy of the real DOM that React uses to detect changes efficiently and update only what’s necessary for optimal performance.
19. Explain SSR, CSR, and SSG rendering methods.
⦁ SSR (Server-Side Rendering): Pages rendered on server and sent to client.
⦁ CSR (Client-Side Rendering): Browser renders content after loading JS.
⦁ SSG (Static Site Generation): HTML pre-built at build time, served statically.
20. What is tree shaking in JavaScript bundlers?
Removing unused code from final bundles during build to optimize size and loading times.
Double Tap ❤️ For Part-3