https://github.com/facn5/NodeJs-AutoComplete/blob/master/frontend/scripts/xhr.js#L33 You can send words as input to your callback cb: `cb(words)` and change [your call](https://github.com/facn5/NodeJs-AutoComplete/blob/master/frontend/scripts/dom.js#L13) to the following `connectToBase(this.value, (words) => {`
https://github.com/facn5/NodeJs-AutoComplete/blob/master/frontend/scripts/xhr.js#L33
You can send words as input to your callback cb:
cb(words)and change your call to the following
connectToBase(this.value, (words) => {