Repository navigation
Commit db88a2d
committed
qns: make JavaScript answers more practical
Audit all 193 English answers against a practical interview rubric and improve the 130 answers with concrete gaps in examples, tradeoffs, failure modes, or current platform guidance. Regenerate the README so its embedded TL;DR sections stay synchronized while preserving metadata and translations.1 parent 8800d6d commit db88a2d
131 files changed
Lines changed: 2754 additions & 2641 deletions
File tree
- questions
- describe-event-capturing
- describe-the-difference-between-a-cookie-sessionstorage-and-localstorage
- describe-the-difference-between-script-async-and-script-defer
- difference-between-document-load-event-and-document-domcontentloaded-event
- explain-ajax-in-as-much-detail-as-possible
- explain-event-delegation
- explain-how-jsonp-works-and-how-its-not-really-ajax
- explain-how-prototypal-inheritance-works
- explain-how-this-works-in-javascript
- explain-the-concept-of-a-callback-function-in-asynchronous-operations
- explain-the-concept-of-a-microtask-queue
- explain-the-concept-of-caching-and-how-it-can-be-used-to-improve-performance
- explain-the-concept-of-code-coverage-and-how-it-can-be-used-to-assess-test-quality
- explain-the-concept-of-content-security-policy-csp-and-how-it-enhances-security
- explain-the-concept-of-cross-site-request-forgery-csrf-and-its-mitigation-techniques
- explain-the-concept-of-error-propagation-in-javascript
- explain-the-concept-of-hoisting-with-regards-to-functions
- explain-the-concept-of-inheritance-in-es2015-classes
- explain-the-concept-of-input-validation-and-its-importance-in-security
- explain-the-concept-of-lazy-loading-and-how-it-can-improve-performance
- explain-the-concept-of-tagged-templates
- explain-the-concept-of-test-driven-development-tdd
- explain-the-concept-of-the-prototype-pattern
- explain-the-concept-of-the-singleton-pattern
- explain-the-concept-of-the-strategy-pattern
- explain-the-concept-of-the-web-socket-api
- explain-the-concept-of-this-binding-in-event-handlers
- explain-the-concept-of-tree-shaking-in-module-bundling
- explain-the-difference-between-documentqueryselector-and-documentgetelementbyid
- explain-the-difference-between-mutable-and-immutable-objects
- explain-the-difference-between-synchronous-and-asynchronous-functions
- explain-the-difference-between-unit-testing-integration-testing-and-end-to-end-testing
- explain-the-differences-between-commonjs-modules-and-es-modules
- explain-the-different-states-of-a-promise
- explain-the-different-ways-the-this-keyword-can-be-bound
- explain-the-observer-pattern-and-its-use-cases
- explain-the-same-origin-policy-with-regards-to-javascript
- explain-what-a-single-page-app-is-and-how-to-make-one-seo-friendly
- how-can-you-create-custom-error-objects
- how-can-you-implement-secure-authentication-and-authorization-in-javascript-applications
- how-can-you-optimize-dom-manipulation-for-better-performance
- how-can-you-optimize-network-requests-for-better-performance
- how-can-you-prevent-clickjacking-attacks
- how-can-you-prevent-sql-injection-vulnerabilities-in-javascript-applications
- how-can-you-test-asynchronous-code-in-javascript
- how-do-iframe-on-a-page-communicate
- how-do-you-abort-a-web-request-using-abortcontrollers
- how-do-you-add-remove-and-modify-html-elements-using-javascript
- how-do-you-add-remove-and-update-elements-in-an-array
- how-do-you-check-if-an-object-has-a-specific-property
- how-do-you-check-the-data-type-of-a-variable
- how-do-you-convert-a-string-to-a-number-in-javascript
- how-do-you-handle-errors-in-asynchronous-operations
- how-do-you-import-and-export-modules-in-javascript
- how-do-you-make-an-http-request-using-the-fetch-api
- how-do-you-organize-your-code-module-pattern-classical-inheritance
- how-do-you-redirect-to-a-new-page-in-javascript
- how-do-you-reliably-determine-whether-an-object-is-empty
- how-do-you-use-windowhistory-api
- how-do-you-validate-form-elements-using-the-constraint-validation-api
- how-do-you-write-unit-tests-for-javascript-code
- how-does-hoisting-affect-function-declarations-and-expressions
- how-does-javascript-garbage-collection-work
- how-is-promiseall-different-from-promiseallsettled
- what-advantage-is-there-for-using-the-arrow-syntax-for-a-method-in-a-constructor
- what-are-callback-functions-and-how-are-they-used
- what-are-default-parameters-and-how-are-they-used
- what-are-design-patterns-and-why-are-they-useful
- what-are-event-listeners-and-how-are-they-used
- what-are-iterators-and-generators-and-what-are-they-used-for
- what-are-javascript-object-getters-and-setters-for
- what-are-javascript-polyfills-for
- what-are-mocks-and-stubs-and-how-are-they-used-in-testing
- what-are-progressive-web-applications-pwas
- what-are-promises-and-how-do-they-work
- what-are-proxies-in-javascript-used-for
- what-are-server-sent-events
- what-are-some-best-practices-for-handling-sensitive-data-in-javascript
- what-are-some-best-practices-for-writing-maintainable-and-effective-tests
- what-are-some-common-performance-bottlenecks-in-javascript-applications
- what-are-some-common-security-headers-and-their-purpose
- what-are-some-of-the-advantages-disadvantages-of-writing-javascript-code-in-a-language-that-compiles-to-javascript
- what-are-some-popular-javascript-testing-frameworks
- what-are-some-techniques-for-reducing-reflows-and-repaints
- what-are-some-tools-and-techniques-for-identifying-security-vulnerabilities-in-javascript-code
- what-are-some-tools-that-can-be-used-for-javascript-testing
- what-are-some-tools-that-can-be-used-to-measure-and-analyze-javascript-performance
- what-are-symbols-used-for
- what-are-the-advantages-and-disadvantages-of-using-ajax
- what-are-the-benefits-of-using-a-module-bundler
- what-are-the-differences-between-map-set-and-weakmap-weakset
- what-are-the-differences-between-xmlhttprequest-and-fetch
- what-are-the-different-methods-for-iterating-over-an-array
- what-are-the-different-types-of-errors-in-javascript
- what-are-the-different-types-of-testing-in-software-development
- what-are-the-different-ways-to-copy-an-object-or-an-array
- what-are-the-different-ways-to-make-an-api-call-in-javascript
- what-are-the-metadata-fields-of-a-module
- what-are-the-potential-issues-caused-by-hoisting
- what-are-the-potential-pitfalls-of-using-closures
- what-are-the-pros-and-cons-of-using-promises-instead-of-callbacks
- what-are-the-various-data-types-in-javascript
- what-are-the-various-ways-to-create-objects-in-javascript
- what-are-web-workers-and-how-can-they-be-used-to-improve-performance
- what-are-workers-in-javascript-used-for
- what-do-you-think-of-amd-vs-commonjs
- what-is-a-closure-and-how-why-would-you-use-one
- what-is-asyncawait-and-how-does-it-simplify-asynchronous-code
- what-is-cross-site-scripting-xss-and-how-can-you-prevent-it
- what-is-event-loop-what-is-the-difference-between-call-stack-and-task-queue
- what-is-objectfreeze-for
- what-is-objectpreventextensions-for
- what-is-objectseal-for
- what-is-recursion-and-how-is-it-used-in-javascript
- what-is-the-difference-between-a-map-object-and-a-plain-object-in-javascript
- what-is-the-difference-between-eventpreventdefault-and-eventstoppropagation
- what-is-the-difference-between-innerhtml-and-textcontent
- what-is-the-difference-between-settimeout-setimmediate-and-processnexttick
- what-is-the-intl-namespace-object-for
- what-is-the-module-pattern-and-how-does-it-help-with-encapsulation
- what-is-the-purpose-of-the-finally-block
- what-is-the-purpose-of-the-new-keyword
- what-is-the-use-of-promiseall
- what-is-use-strict-what-are-the-advantages-and-disadvantages-to-using-it
- what-tools-and-techniques-do-you-use-for-debugging-javascript-code
- whats-the-difference-between-a-variable-that-is-null-undefined-or-undeclared-how-would-you-go-about-checking-for-any-of-these-states
- when-would-you-use-document-write
- why-you-might-want-to-create-static-class-members
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
| 155 | + | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | | - | |
| 176 | + | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
| 182 | + | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
187 | | - | |
| 186 | + | |
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
191 | | - | |
| 190 | + | |
192 | 191 | | |
193 | 192 | | |
194 | 193 | | |
| |||
0 commit comments