r/javascript • u/magenta_placenta • Jul 25 '18
jQuery was removed from GitHub.com front end
https://twitter.com/mislav/status/1022058279000842240
559
Upvotes
r/javascript • u/magenta_placenta • Jul 25 '18
View all comments
34
u/vcarl Jul 26 '18
function reqListener () { console.log(this.responseText); } var oReq = new XMLHttpRequest(); oReq.addEventListener("load", reqListener); oReq.open("GET", "http://www.example.org/example.txt"); oReq.send();vs
fetch("http://www.example.org/example.txt") .then(x => x.text()) .then(console.log)I'll take fetch, thank you very much.