Check Key Exist In Array Javascript Function Definition Is Not Allowed