Sort by number of letters. Check words starting with the same letter. Verify that the word is fully present in another word. When both begin with the same letter. If it is fully present. Show only the first word and ignore the second word
var arraylist = ["running", "walking", "standing", "writing", "waiting", "sleeping", "reading", "washing", "sitting", "riding", "shopping", "singing", "painting", "watching", "swimming", "pulling", "smoking", "pushing", "drinking", "dancing", "cooking", "crying ", "eating", "smiling","run", "walk", "push", "cook", "cry", "eat"];
Waiting for output using javascript / jquery:
I need to remove these words: run, walk, push, cook, cry, eat.
var arrayList = ["run", "walk", "standing", "writing", "waiting", "sleeping", "reading", "washing", "sitting", "riding", "shopping", "singing", "painting", "watching", "swimming", "pulling", "smoking", "push", "drinking", "dancing", "cook", "cry", "eat", "smiling","run", "walk", "push", "cook", "cry", "eat"];