Create an Angular or HTML app that has an search box (input box).
You will have an array stored somewhere that has at least 20 words. You can use this array and add/subtract from it as you wish:
As the user starts typing in the search box you will need to print the filtered results into the console. Meaning every keystroke made creates a filter and console.logs the filteredArray.
So if you had an array like this:
var words = ["cat","car","dog","rack", "baccarat"]
And if the letter entered in the box was "c", the console would print:
If the letter entered was "ca" the console would print:
["cat", "car", "baccarat"]
And so forth.
You'll probably want to look into using AngularJS's
indexOf() string method. Simply put,
ngChange looks for changes in an
ngModel changes. Google it for more info.