I'm displaying some data on my web page from the NY Times API but I only want the first 4 articles to be displayed. How would I get just the first 4 to be displayed and the rest of them to disappear in JavaScript?

I haven't tried any possible solutions yet because I really don't know how I would do this. 

Here's some of the data that I'm displaying from the API but there's like 20 top stories from the newspaper and I only want to display 4.
[![enter image description here](https://i.stack.imgur.com/ZHKiu.png)](https://i.stack.imgur.com/ZHKiu.png)

```
let html = [];
fetch('https://api.nytimes.com/svc/topstories/v2/technology.json?api-key=...')
  .then((resp) => resp.json())
  .then(function(data) {
    data.results.forEach(res => {
      html.push(`<h1>${res.title}</h1>`);
      html.push(`<p>${res.url}</p>`);
      html.push(`<p>${res.abstract}</p>`);
      html.push(`<p>${res.published_date}</p>`);
      html.push(`<image>${res.multimedia[4]}</image>`);
    })
    document.getElementById("res").innerHTML = html.join("");
  })

```