So I applied for a position as a web engineer at Mozilla Taiwan to work on firefox OS (a full html5 os to run on smartphone, super cool project), and I got a pre-interview assignment. The goal was to write a small autocomplete widget with some requirements:
- Avoid using well-known UI libraries.
- The dataset should contains around 100~1000 entries. (example of dataset provided).
- User should be blocked from submit the input unless the input matches one of the entries.
- The whole thing should work when loading from or file:/// url, without server-side (e.g. PHP) logic.
- Please take care of memory consumption and efficiency.
- Consider making your code unit-testable and reusable.
edit Ultimately it didn't work out for Mozilla :( /edit