Javascript to sort the beginning match string in input reserved word list

Add wordlist in searchWord.js Add following code in search, we can split the data into two arrays, one that starts with input and one. Sort each separately, then combine the two results: