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)

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.