JavaScript
JavaScript
Roadmap:
Basics
- What is JavaScript?
- Why is JavaScript called single-threaded? (One statement at a time)
- Hoisting?
letvsvarvsconst- Ref
- SuGHaR: Scope, Global Property, Hoisting, Redeclaration
- Functions vs Arrow Functions?
- Explain
thiskeyword. - Higher Order Function (or) Currying?
- What is a pure function?
- Where does the
thisreference point when a function (or arrow function) is written in global scope?
Async & Event Handling
- What are callbacks?
- What are event listeners?
- Promise vs Async–Await?
- Callback Hell?
- How to convert callback to promise?
- Asynchronous and non-blocking calls? Blocking vs synchronous?
- How to handle multiple asynchronous calls concurrently?
- Assert in Node.js?
- What is the need for Promise/Async–Await even though we have callbacks?
- Event loop: Event Queue
Functions & Closures
- What are closures in JavaScript?
- Coercion? (Type Coercion)
- Symbols?
- Iterators and Generators
- Difference between iterables and enumerables?
- IIFE (Immediately Invoked Function Expression)?
- Function Currying
- Closures — what & when to use?
- Proxy objects?
- Handling click events outside the target element?
DOM & Web APIs
- What is DOM?
- Web Components?
- Event Bubbling and Capturing (Event Propagation / Delegation)?
Language Features
==vs===- New ES6 features?
- Cyclic Dependency Problem?
- OOPs in JavaScript?
- Inheritance: Classical & Prototype
- Constructor function vs Class
callvsbindvsapply- Web Storage (LocalStorage, SessionStorage) & IndexedDB
- Cookies?
- Functional Programming & its Principles
- Defer vs Async tag in HTML
- Modeules: CommonJS vs AMD vs RequireJS
Module Bundlers
- What are Module Bundlers? (Webpack, Rollup, Parcel, Snowpack, CommonJS)
- Code Splitting in Webpack
- Loaders: style-loader, html-loader
- Plugins: BundleAnalyzerPlugin, etc.
- Dev Server
- Hot Module Replacement
Browser & Networking
- Why does the browser send OPTIONS requests before POST/GET requests?
- Why do we need
package-lock.json?
Node.js
- What is Node.js?
setTimeoutvssetIntervalprocess.nextTickvssetImmediatevssetTimeout(0)- Reactor Pattern in Node.js
- What are Streams? Types of Streams?
- Buffers (Streams of binary data)
- WebSockets
- How to queue tasks?
- Libraries: Bull / BullMQ
Processes & Threads
- What is an Event in Node.js?
- How does EventEmitter work, when should it be used?
- How to access command line args in Node.js?
- Parallel Processing
- Optimizations & scaling: Caching, Scaling, Clusters
- What are child threads in Node.js?
Security & Best Practices
- How to ensure npm dependencies are safe?
- How to restrict cross-site access to cookies?
- Side Effects: Ref
Express.js
- What is Express?
- What are middlewares?
- What is
next()? - How to pass data between middlewares?
- Authentication & Authorization (JWT – structure & algorithm)
- How to maintain sessions on the server side?
- Cookies, Redis cache, express-session, others
- Secure Cookies
- Refresh token implementation
- Database connections: Sequelize, Knex.js, Mongoose, Bookshelf, GooseBird
- Loggers: Winston, Morgan
- File Upload: Multer
- Puppeteer: PDF generation / Headless Chrome
- Sequelize: relationships, model hooks
- Knex.js migrations (up & down)
- API & DB optimizations: Node Clusters, REST optimizations, DB transactions
- Swagger for API documentation
- DB transaction management (auto-commit = false, rollback)
- How to implement custom middleware?
Links
Browser Internals
Performance
- How to make websites fast?