Healthy.io interview question

How to implement autocomplete in javascript and html