Javascript Remove Empty String From Array To Hashmap Internal Implementation