mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-30 21:53:28 +08:00
Clean up apostrophes
This commit is contained in:
@ -6,7 +6,7 @@ Design Questions
|
||||
Talk me through a full stack implementation of an autocomplete widget. A user can type text into it, and get back results from a server.
|
||||
- How would you design a frontend to support the following features:
|
||||
- Fetch data from a backend API
|
||||
- Render results as a tree (items can have parents/children - it’s not just a flat list)
|
||||
- Render results as a tree (items can have parents/children - it's not just a flat list)
|
||||
- Support for checkbox, radio button, icon, and regular list items - items come in many forms
|
||||
- What does the component's API look like?
|
||||
- What does the backend API look like?
|
||||
|
@ -696,7 +696,7 @@ As a personal habit, I never leave my variables undeclared or unassigned. I will
|
||||
|
||||
### What is a closure, and how/why would you use one?
|
||||
|
||||
A closure is the combination of a function and the lexical environment within which that function was declared. The word "lexical" refers to the fact that lexical scoping uses the location where a variable is declared within the source code to determine where that variable is available. Closures are functions that have access to the outer (enclosing) function’s variables—scope chain even after the outer function has returned.
|
||||
A closure is the combination of a function and the lexical environment within which that function was declared. The word "lexical" refers to the fact that lexical scoping uses the location where a variable is declared within the source code to determine where that variable is available. Closures are functions that have access to the outer (enclosing) function's variables—scope chain even after the outer function has returned.
|
||||
|
||||
**Why would you use one?**
|
||||
|
||||
@ -1154,7 +1154,7 @@ The downsides:
|
||||
|
||||
### What is the extent of your experience with Promises and/or their polyfills?
|
||||
|
||||
Possess working knowledge of it. A promise is an object that may produce a single value some time in the future: either a resolved value, or a reason that it’s not resolved (e.g., a network error occurred). A promise may be in one of 3 possible states: fulfilled, rejected, or pending. Promise users can attach callbacks to handle the fulfilled value or the reason for rejection.
|
||||
Possess working knowledge of it. A promise is an object that may produce a single value some time in the future: either a resolved value, or a reason that it's not resolved (e.g., a network error occurred). A promise may be in one of 3 possible states: fulfilled, rejected, or pending. Promise users can attach callbacks to handle the fulfilled value or the reason for rejection.
|
||||
|
||||
Some common polyfills are `$.deferred`, Q and Bluebird but not all of them comply to the specification. ES2015 supports Promises out of the box and polyfills are typically not needed these days.
|
||||
|
||||
|
@ -17,7 +17,7 @@ WIP.
|
||||
- **Hoisting** - TBD
|
||||
- **Promise** - TBD
|
||||
- **Prototype** - TBD
|
||||
- **This** - The `this` keyword does not refer to the function in which it is used or it’s scope. It refers to the object on which a function is being executed and depends entirely on the call-site of the function.
|
||||
- **This** - The `this` keyword does not refer to the function in which it is used or it's scope. It refers to the object on which a function is being executed and depends entirely on the call-site of the function.
|
||||
|
||||
## Core Language
|
||||
|
||||
|
Reference in New Issue
Block a user