0

I have array that contains numbers 1-4 but there can't be duplicate numbers. I thought to check if there is 2 or more of same number but not sure how to check for consecutive and non-consecutive.

I tried this but only works for consecutive numbers: /1{2,}|2{2,}|3{2,}|4{2,}/

Neos
  • 1

0 Answers0