Multiple choice technology web 2.0

How will you check if the server response is ready?

  1. When readyState is 1 and status is 200

  2. When readyState is 1 and status is 400

  3. When readyState is 4 and status is 200

  4. When readyState is 4 and status is 400

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In AJAX, readyState 4 indicates that the XMLHttpRequest transaction has completed, and status 200 signifies a successful HTTP response. Other status codes like 400 indicate client errors, and lower readyState values mean the request is still loading or processing.