Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

The fetch API

Fetch is an asynchronous function that is provided by JS natively in order to perform AJAX calls, either locally or, most of the times, externally. 

Fetch accepts a couple of parameters, but most importantly is the url address of the service, that we are requiring information from. 

In the example above we just require to bring asychronously an image to load it into our html later. Don't forget that fetch (due to it's asynchronous nature) returns a promise, thus  in order to see the results (the response that comes back) a  .then() function must be chained afterwards. 

The response that comes back is a response object that shows if the communication between the client and the server was successful or not (status code etc.) 

In our case we use the url property of the response object in order to fill the src attribute of the freshly created image.