All fields

“Design Patterns in JavaScript” in Information Technology

47 questions across 4 technologies.

Information Technology

47 questions in 4 technologies

#QuestionTechnologyTopicLevel
1When is it a mistake to force a 'classic' design pattern into idiomatic JavaScript? JavaScript › Design Patterns in JavaScriptJavaScriptDesign Patterns in JavaScriptAdvanced
2How is the Decorator pattern typically implemented in JavaScript? JavaScript › Design Patterns in JavaScriptJavaScriptDesign Patterns in JavaScriptIntermediate
3What is the Command pattern and where is it useful in JavaScript apps? JavaScript › Design Patterns in JavaScriptJavaScriptDesign Patterns in JavaScriptAdvanced
4What is the Singleton pattern and how is it implemented in JavaScript? JavaScript › Design Patterns in JavaScriptJavaScriptDesign Patterns in JavaScriptBeginner
5How do you implement the Observer pattern in JavaScript? JavaScript › Design Patterns in JavaScriptJavaScriptDesign Patterns in JavaScriptIntermediate
6What is the Strategy pattern and how does it help avoid large if/else chains? JavaScript › Design Patterns in JavaScriptJavaScriptDesign Patterns in JavaScriptAdvanced
7How do you implement the Proxy pattern using JavaScript's built-in Proxy object? JavaScript › Design Patterns in JavaScriptJavaScriptDesign Patterns in JavaScriptAdvanced
8What is the Factory pattern, and how does it differ from calling a class constructor directly? JavaScript › Design Patterns in JavaScriptJavaScriptDesign Patterns in JavaScriptIntermediate
9What is the Adapter pattern and why is it useful when integrating third-party code? JavaScript › Design Patterns in JavaScriptJavaScriptDesign Patterns in JavaScriptAdvanced
10What is the Module pattern and what problem does it solve? JavaScript › Design Patterns in JavaScriptJavaScriptDesign Patterns in JavaScriptBeginner
11What is Domain-Driven Design (DDD), and how do its concepts of entities, value objects, and aggregates apply to a Node.js codebase? Node.js › Architecture & Design PatternsNode.jsArchitecture & Design PatternsAdvanced
12How is the Factory pattern commonly applied in Node.js applications, and what problem does it solve? Node.js › Architecture & Design PatternsNode.jsArchitecture & Design PatternsIntermediate
13What is the Singleton pattern, and what are the specific risks of using it in a Node.js application? Node.js › Architecture & Design PatternsNode.jsArchitecture & Design PatternsIntermediate
14What is Dependency Injection, and how is it typically implemented in Node.js given the language has no built-in DI container? Node.js › Architecture & Design PatternsNode.jsArchitecture & Design PatternsIntermediate
15What is the Strategy pattern, and how would you apply it to support multiple payment providers in a Node.js checkout service? Node.js › Architecture & Design PatternsNode.jsArchitecture & Design PatternsIntermediate
16What is a Facade pattern, and how might it be used to simplify a Node.js application's interaction with several third-party SDKs? Node.js › Architecture & Design PatternsNode.jsArchitecture & Design PatternsAdvanced
17How does styled components let you write CSS directly inside your JavaScript files? React › Styling in React (CSS Modules, Styled Components & Tailwind)ReactStyling in React (CSS Modules, Styled Components & Tailwind)Intermediate
18What is error propagation, and how does an uncaught error in a nested function behave? JavaScript › Error HandlingJavaScriptError HandlingIntermediate
19What is snapshot testing and what's a common pitfall with it? JavaScript › Debugging, Testing & ToolingJavaScriptDebugging, Testing & ToolingAdvanced
20Why is BigInt generally the wrong tool for representing monetary amounts with decimals, like $19.99? JavaScript › Numbers, Math & BigIntJavaScriptNumbers, Math & BigIntAdvanced
21How does method overriding with super work in JavaScript classes? JavaScript › Classes & Class SyntaxJavaScriptClasses & Class SyntaxAdvanced
22How would you build an interactive CLI wizard that prompts the user for multiple pieces of input using a library like Inquirer.js? Node.js › CLI Tools & Scripting with Node.jsNode.jsCLI Tools & Scripting with Node.jsAdvanced
23What does the node:util.types module provide, and how does it differ from JavaScript's built-in typeof operator? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesIntermediate
24How do you format a date for a specific locale without a library? JavaScript › Date, Time & Internationalization (Intl API)JavaScriptDate, Time & Internationalization (Intl API)Intermediate
25How do you handle out-of-range writes to a TypedArray safely? JavaScript › ArrayBuffer, TypedArrays & Binary DataJavaScriptArrayBuffer, TypedArrays & Binary DataAdvanced
26What is the Temporal API and what problem does it solve? JavaScript › Date, Time & Internationalization (Intl API)JavaScriptDate, Time & Internationalization (Intl API)Advanced
27What is event bubbling? JavaScript › DOM & EventsJavaScriptDOM & EventsBeginner
28What is IndexedDB and how does it differ from a simple key-value store? JavaScript › Browser Storage & Web APIsJavaScriptBrowser Storage & Web APIsIntermediate
29How do you delegate from one generator to another using yield*? JavaScript › Iterators & GeneratorsJavaScriptIterators & GeneratorsIntermediate
30How does sort() compare values by default, and how do you fix numeric sorting? JavaScript › Arrays & Array MethodsJavaScriptArrays & Array MethodsAdvanced
31What's the difference between the capturing and bubbling phases of event propagation? JavaScript › DOM & EventsJavaScriptDOM & EventsAdvanced
32How does mark-and-sweep garbage collection actually determine which objects are reachable? JavaScript › Memory Management & Garbage CollectionJavaScriptMemory Management & Garbage CollectionAdvanced
33What does the node:events module's EventEmitter class provide, and what naming convention do most Node.js core APIs follow when using it? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesBeginner
34How do you create a custom class that emits events by extending Node's built-in EventEmitter? Node.js › Events & EventEmitterNode.jsEvents & EventEmitterBeginner
35How would you implement Attribute-Based Access Control (ABAC) in a Node.js application when RBAC roles aren't expressive enough? Node.js › Authentication & AuthorizationNode.jsAuthentication & AuthorizationIntermediate
36How does Sequelize define models and relationships for a relational (SQL) database in Node.js? Node.js › Databases & ORMs (MongoDB/Mongoose, SQL/Sequelize)Node.jsDatabases & ORMs (MongoDB/Mongoose, SQL/Sequelize)Intermediate
37Why can decorators make code harder to statically analyze or tree-shake, and what's a common criticism of overusing them? TypeScript › DecoratorsTypeScriptDecoratorsAdvanced
38How would you implement a custom event that carries multiple pieces of data, and what's the convention for structuring the emitted payload? Node.js › Events & EventEmitterNode.jsEvents & EventEmitterAdvanced
39What's the difference between a named export and a default export? JavaScript › ES ModulesJavaScriptES ModulesBeginner
40What does the # syntax mean for class members? JavaScript › Classes & Class SyntaxJavaScriptClasses & Class SyntaxIntermediate
41What's the difference between event.target and event.currentTarget? JavaScript › DOM & EventsJavaScriptDOM & EventsIntermediate
42How do you create and dispatch a custom DOM event? JavaScript › DOM & EventsJavaScriptDOM & EventsIntermediate
43How does MutationObserver let you react to DOM changes made by other code? JavaScript › DOM & EventsJavaScriptDOM & EventsAdvanced
44Why can circular module imports (Module A imports B, which imports A) cause subtle bugs? JavaScript › ES ModulesJavaScriptES ModulesAdvanced
45How would you implement a custom Symbol.iterator for a tree data structure to enable depth-first traversal with for...of? JavaScript › Iterators & GeneratorsJavaScriptIterators & GeneratorsAdvanced
46How would you use a Map to implement an LRU (Least Recently Used) cache? JavaScript › Map, Set, WeakMap & WeakSetJavaScriptMap, Set, WeakMap & WeakSetAdvanced
47What is optimistic concurrency control, and how would you implement it to prevent lost updates when two users edit the same record simultaneously? Node.js › DatabasesNode.jsDatabasesAdvanced