quiz/js: tidy up

This commit is contained in:
Yangshun 2024-06-08 10:09:25 +08:00
parent e5f99b68ba
commit 2dc187f8ee
7 changed files with 7 additions and 7 deletions

View File

@ -2,7 +2,7 @@
title: Describe event capturing
---
**TL;DR**
## TL;DR
Event capturing is a lesser-used counterpart to [event bubbling](/questions/quiz/describe-event-bubbling) in the DOM event propagation mechanism. It follows the opposite order, where an event triggers first on the ancestor element and then travels down to the target element.

View File

@ -2,7 +2,7 @@
title: Explain Ajax in as much detail as possible.
---
**TL;DR**
## TL;DR
Ajax (asynchronous JavaScript and XML) facilitates asynchronous communication between the client and server, enabling dynamic updates to web pages without reloading. It uses techniques like `XMLHttpRequest` or the `fetch` API to send and receive data in the background. In modern web applications, `fetch` API is more commonly used to implement Ajax.

View File

@ -2,7 +2,7 @@
title: How do you abort a web request using `AbortController`?
---
**TL;DR**
## TL;DR
`AbortController` is a Web API for canceling ongoing asynchronous operations like fetch requests.

View File

@ -1,5 +1,5 @@
{
"slug": "what-are-javascript-object-getters-and-settes-for",
"slug": "what-are-javascript-object-getters-and-setters-for",
"languages": [],
"companies": [],
"premium": false,

View File

@ -2,7 +2,7 @@
title: What are the advantages and disadvantages of using Ajax?
---
**TL;DR**
## TL;DR
### Advantages:

View File

@ -2,7 +2,7 @@
title: What are the differences between `XMLHttpRequest` and `fetch`?
---
**TL;DR**
## TL;DR
`XMLHttpRequest` (XHR) and `fetch` API are both used for asynchronous HTTP requests in JavaScript. `fetch` offers a cleaner syntax, promise-based approach, and more modern feature set compared to XHR.

View File

@ -2,7 +2,7 @@
title: What are the various ways to create objects in JavaScript?
---
**TL;DR**
## TL;DR
Creating objects in JavaScript offers several methods: