Request chapter XHR task 5

can someone help me to understand this function please :

const displaySuggestions = (event) => {
  event.preventDefault()
  while(responseField.firstChild){
    responseField.removeChild(responseField.firstChild)
  };
  getSuggestions();
};
```[https://gist.github.com/784659fdbf6c3ce539127454b19a0ebc](https://gist.github.com/784659fdbf6c3ce539127454b19a0ebc)