How can you make an asynchronous request to a server in JavaScript?

2025

How can you make an asynchronous request to a server in JavaScript?

Answer: C. Using the fetch API or XMLHttpRequestAsynchronous requests to a server in JavaScript are commonly made using the fetch API or XMLHttpRequest. The async and await keywords help handle asynchronous…

  1. A.

    Using the "async" keyword

  2. B.

    Using the "await" keyword

  3. C.

    Using the fetch API or XMLHttpRequest

  4. D.

    By defining a callback function

Attempted by 57 students.

Show answer & explanation

Correct answer: C

Asynchronous requests to a server in JavaScript are commonly made using the fetch API or XMLHttpRequest. The async and await keywords help handle asynchronous code but do not themselves send the request.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs

Loading lesson…