Accessing (Modifying) a class member inside an onload function
I have stuck with a problem here, I made a class named Ajax, in its constructor I've made a member named 'response' [this.response], Then I created the xhr object also a member. Then I created a method named 'makeAjax(page, method)', which takes two arguments one for page and another for method of request. Then, now when I used onload method, the problem starts. I'm want to access my this.response member inside the this.xhr.onload. Im a newbie, so I'm bad with some bindings Error: Uncaught TypeError: Cannot assign to read only property 'response' of object '<#XMLHttpRequest>' at XMLHttpRequest.xhr.onload https://code.sololearn.com/WBjlb1JFa0dJ/?ref=appError: Uncaught TypeError: Cannot assign to read only property 'response' of object '<#XMLHttpRequest>' at XMLHttpRequest.xhr.onload