You can just use Array.indexOf() here -- we code to modern browser APIs only.