Javascript Determine If Array