Js Check If Element In Array Javascript Function How To Use