You can use a range {12,13} in the regex instead of the || statement.

```javascript
return (/^\d{12,13}$/.exec(barcode) !== null
```