Seeking to utilize this example without relying on jquery or any other libraries.
The following code is in place:
let xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {...}
This code uses the old style function()
.
How can I convert this to arrow function syntax?
let xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = () => {...}
I tried this but it did not work. Am I close, or am I approaching this incorrectly? Once again, I aim to complete this exercise without using external libraries.