Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ handleResponse({

## Further reading

- [MDN Web Docs: JSONP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/JSONP)
- [W3Schools: JSONP](https://www.w3schools.com/js/js_json_jsonp.asp)
- [Same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy)
- [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ console.log(zip); // 10001

- [MDN Web Docs: Destructuring assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment)
- [JavaScript.info: Destructuring assignment](https://javascript.info/destructuring-assignment)
- [FreeCodeCamp: Destructuring assignment](https://www.freecodecamp.org/news/destructuring-assignment-in-es6-30e398f21d10/)
- [FreeCodeCamp: How Destructuring Works in JavaScript](https://www.freecodecamp.org/news/destructuring-in-javascript/)
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,5 @@ var arrowFunction = () => {
## Further reading

- [MDN Web Docs on Hoisting](https://developer.mozilla.org/en-US/docs/Glossary/Hoisting)
- [JavaScript.info on Hoisting](https://javascript.info/hoisting)
- [MDN Web Docs on Function Declarations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)
- [MDN Web Docs on Function Expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function)
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,4 @@ console.log(result); // "User input: <script>alert("XSS")</sc
## Further reading

- [MDN Web Docs: Template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)
- [JavaScript.info: Tagged templates](https://javascript.info/tagged-templates)
- [Exploring JS: Template literals](http://exploringjs.com/es6/ch_template-literals.html#tagged-templates)
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ console.log(sum(...numbers)); // Output: 6

- [MDN Web Docs: Spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax)
- [JavaScript.info: Spread operator](https://javascript.info/rest-parameters-spread-operator#spread-operator)
- [FreeCodeCamp: JavaScript spread operator explained](https://www.freecodecamp.org/news/javascript-spread-operator-explained/)
- [FreeCodeCamp: JavaScript Spread and Rest Operators](https://www.freecodecamp.org/news/javascript-spread-and-rest-operators/)
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,5 @@ obj.greet(); // undefined, because `this` is inherited from the global scope
## Further reading

- [MDN Web Docs: this](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this)
- [JavaScript.info: This](https://javascript.info/this)
- [JavaScript.info: Object methods, "this"](https://javascript.info/object-methods)
- [You Don't Know JS: this & Object Prototypes](https://github.com/getify/You-Dont-Know-JS/tree/2nd-ed/this%20%26%20object%20prototypes)
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ Here is a simple example demonstrating the same-origin policy:
- [MDN Web Docs: Same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy)
- [MDN Web Docs: Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
- [OWASP: Cross-Site Scripting (XSS)](https://owasp.org/www-community/attacks/xss/)
- [OWASP: Cross-Site Request Forgery (CSRF)](https://owasp.org/www-community/attacks/csrf/)
- [OWASP: Cross-Site Request Forgery (CSRF)](https://owasp.org/www-community/attacks/csrf)
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ app.get('/admin', checkRole('admin'), (req, res) => {

- [JWT.io](https://jwt.io/)
- [Passport.js documentation](http://www.passportjs.org/docs/)
- [OWASP Secure Coding Practices](https://owasp.org/www-project-secure-coding-practices/)
- [OWASP Secure Coding Practices-Quick Reference Guide](https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/)
- [MDN Web Docs on HTTPS](https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security)
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ element.style.height = `${height + 10}px`; // Write

## Further reading

- [MDN Web Docs: DOM manipulation](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Manipulating_the_DOM)
- [FreeCodeCamp: DOM Manipulation in JavaScript](https://www.freecodecamp.org/news/dom-manipulation-in-javascript/)
- [Google Developers: Avoid large, complex layouts and layout thrashing](https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing)
- [React documentation](https://react.dev/learn)
- [MDN Web Docs: Using requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame)
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ Reducing the amount of data sent in each request can improve performance:

- [MDN Web Docs: HTTP caching](https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching)
- [Google Developers: Optimizing content efficiency](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/)
- [Web.dev: Use HTTP/2](https://web.dev/http2/)
- [MDN: HTTP/2](https://developer.mozilla.org/en-US/docs/Glossary/HTTP_2)
- [MDN Web Docs: Service workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API)
- [Google Developers: Image optimization](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/image-optimization)
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,4 @@ In this example, `addOne` is a partially applied function that fixes the first a

## Further reading

- [Currying on MDN](https://developer.mozilla.org/en-US/docs/Glossary/Currying)
- [Partial application on MDN](https://developer.mozilla.org/en-US/docs/Glossary/Partial_application)
- [JavaScript.info on currying and partial application](https://javascript.info/currying-partials)
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ I adhere to coding standards and best practices to ensure code quality:
## Further reading

- [JavaScript Coding Standards](https://github.com/airbnb/javascript)
- [Writing Clean Code](https://www.freecodecamp.org/news/writing-clean-code-6a8e2889b9f8/)
- [How to Write Clean Code](https://www.freecodecamp.org/news/how-to-write-clean-code/)
- [Effective JavaScript Documentation](https://jsdoc.app/)
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,5 @@ console.log(addTwoCustom(3)); // 5

## Further reading

- [Currying on MDN](https://developer.mozilla.org/en-US/docs/Glossary/Currying)
- [Partial application on MDN](https://developer.mozilla.org/en-US/docs/Glossary/Partial_application)
- [Javascript.info: Currying](https://javascript.info/currying-partials)
- [Functional programming in JavaScript](https://eloquentjavascript.net/1st_edition/chapter6.html)
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ This can be particularly helpful in React class components. If you define a clas
## Further reading

- [Arrow function expressions - MDN ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)
- [How to Use JavaScript Arrow Functions – Explained in Detail](https://www.freecodecamp.org/news/javascript-arrow-functions-in-dep)
- [How to Use JavaScript Arrow Functions – Explained in Detail](https://www.freecodecamp.org/news/javascript-arrow-functions-in-depth/)
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ logUserDataMock.verify(); // Verifies that the log method was called once with t

- [Sinon.js documentation](https://sinonjs.org/releases/latest/)
- [Mocks Aren't Stubs](https://martinfowler.com/articles/mocksArentStubs.html) by Martin Fowler
- [Testing JavaScript with Mocks and Stubs](https://www.sitepoint.com/testing-javascript-mocks-stubs/) on SitePoint
- [Sinon Tutorial: JavaScript Testing with Mocks, Spies & Stubs](https://www.sitepoint.com/sinon-tutorial-javascript-testing-mocks-spies-stubs/) on SitePoint
1 change: 0 additions & 1 deletion questions/what-are-promises-and-how-do-they-work/en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,3 @@ In the above example, while `promise1` and `promise2` resolve instantly, `Promis

- [MDN Web Docs: Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
- [JavaScript.info: Promises](https://javascript.info/promise-basics)
- [You Don't Know JS: Promises](https://github.com/getify/You-Dont-Know-JS/blob/2nd-ed/get-started/ch11.md#promises)
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Many popular libraries, especially state management solutions, are built on top

- **[Vue.js](https://vuejs.org/)**: Vue.js is a progressive framework for building user interfaces. In Vue 3, proxies are used extensively to implement the reactivity system.
- **[MobX](https://mobx.js.org/)**: MobX uses proxies to make objects and arrays observable, allowing components to automatically react to state changes.
- **[Immer](https://immerjs.github.io/)**: Immer is a library that allows you to work with immutable state in a more convenient way. It uses proxies to track changes and produce the next immutable state.
- **[Immer](https://immerjs.github.io/immer/)**: Immer is a library that allows you to work with immutable state in a more convenient way. It uses proxies to track changes and produce the next immutable state.

## Summary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,4 @@ console.log(nestedTemplate);
## Further reading

- [MDN Web Docs: Template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
- [JavaScript.info: Template literals](https://javascript.info/template-literals)
- [ES6 Features: Template literals](http://es6-features.org/#StringInterpolation)
- [Qwirey.com: Template literals](https://qwirey.com/technology/es6-features.html#qwp-fold-templateliterals)
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ console.log(newObject); // { a: 1, b: 2, c: 3 }

- [MDN Web Docs: Spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax)
- [JavaScript.info: Spread operator](https://javascript.info/rest-parameters-spread#spread-operator)
- [FreeCodeCamp: How to use the spread operator in JavaScript](https://www.freecodecamp.org/news/how-to-use-the-spread-operator-in-javascript/)
- [FreeCodeCamp: JavaScript Spread and Rest Operators](https://www.freecodecamp.org/news/javascript-spread-and-rest-operators/)
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ import myImage from './image.png';

- [Webpack documentation](https://webpack.js.org/concepts/)
- [Rollup documentation](https://rollupjs.org/guide/en/)
- [Parcel documentation](https://parceljs.org/getting_started.html)
- [Parcel documentation](https://parceljs.org/getting-started/webapp/)
- [MDN Web Docs: JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,5 @@ console.log(obj.getValue()); // 42
## Further reading

- [MDN Web Docs: `this`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this)
- [JavaScript.info: `this`](https://javascript.info/this)
- [JavaScript.info: Object methods, "this"](https://javascript.info/object-methods)
- [Eloquent JavaScript: `this`](https://eloquentjavascript.net/03_functions.html#h_jxlm9L8T4l)
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ Keep your libraries and frameworks up to date to ensure you have the latest secu

## Further reading

- [OWASP XSS Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/XSS_Prevention_Cheat_Sheet.html)
- [OWASP XSS Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html)
- [MDN Web Docs: Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)
- [Google Web Fundamentals: Preventing XSS](https://developers.google.com/web/fundamentals/security/csp)
3 changes: 1 addition & 2 deletions questions/what-is-currying-and-how-does-it-work/en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,5 @@ console.log(result); // Output: 6

## Further reading

- [MDN Web Docs: Function currying](https://developer.mozilla.org/en-US/docs/Glossary/Currying)
- [JavaScript.info: Currying](https://javascript.info/currying)
- [JavaScript.info: Currying](https://javascript.info/currying-partials)
- [Functional Programming in JavaScript: Currying](https://www.sitepoint.com/currying-in-functional-javascript/)
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ remote.pressUndo(); // Light is on

- [Refactoring Guru: Command Pattern](https://refactoring.guru/design-patterns/command)
- [JavaScript Design Patterns: Command](https://www.dofactory.com/javascript/design-patterns/command)
- [MDN Web Docs: Command Pattern](https://developer.mozilla.org/en-US/docs/Glossary/Command_pattern)
- [Patterns.dev: Command Pattern](https://www.patterns.dev/vanilla/command-pattern/)
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ console.log(chars); // ['h', 'e', 'l', 'l', 'o']

- [MDN Web Docs: Spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax)
- [JavaScript.info: Spread operator](https://javascript.info/rest-parameters-spread-operator#spread-operator)
- [FreeCodeCamp: The spread operator in JavaScript](https://www.freecodecamp.org/news/the-spread-operator-in-javascript/)
- [FreeCodeCamp: JavaScript Spread and Rest Operators](https://www.freecodecamp.org/news/javascript-spread-and-rest-operators/)