I have a string consist of 7 digits, I need a function that returns "true" if the string created by repetition of just 2 digits, something like :
check('9669669'); // true
check('0000001'); // true
check('5555555'); // false
check('1111123'); // false
I want to know the easiest way. thanks.
Aucun commentaire:
Enregistrer un commentaire