Multiple choice technology programming languages

onreadystatechange is a method of XMLHttpRequest Object

  1. True

  2. False

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

onreadystatechange is a PROPERTY (event handler) of XMLHttpRequest, not a method. You assign a function to it: xhr.onreadystatechange = function() { ... }. It's called when the readyState changes, but you don't invoke it as a method like xhr.onreadystatechange().