when google first introduced ajax for its search engine, it was an instant hhit and developers all over the world loved it. That was one important milestone in the history web development. This is my take on ajax like type ahead search. It hits an open source api to get all the cities at once, then we use javascript magic to provide great user-experience by suggesting all the matches way ahead so users don't have to type.
- fetch api
- filter method
- regex
- change and keyup events