Hello! I just finished Intermediate JavaScript. It seems like http requests are the last lessons in there, but theres something that is bothering me…
If i were to choose a function, i would choose this:
const JS = function() {
}
because i like the format better.
But when i did the http request lesson, i came to this, for an example:
Set the
xhr.onreadystatechange
event handler equal to an anonymous arrow function. Leave the function empty.
And i had to do that in whole http request lesson, even http request 2.
Why did i have to use arrow functions in just these lessons but not on others?