HTTP response headers in AJAX in JavaScript

The response headers are stored in the headers property of the response object. Let's retrieve some header:

public/client.jsbutton.addEventListener('click', function() {
  fetch('/ajax.html').then(response => {
    console.log(response.headers.get('Content-Type'));
  });
});

And now let's go through all the headers in a loop:

public/client.jsbutton.addEventListener('click', function() {
  fetch('/ajax.html').then(response => {
    for (let [key, value] of response.headers) {
      console.log(key, value);
    }
  });
});
Задание 1

Get a content of the Content-Language header.

Задание 2

Get a content of the Content-Length header.