Javascript Check If Every Value In Array Is Contiguous