Question: `var string = "3y4jd424jfm`

Ideally, I'd want it to be `["3","y","4","j","d","4","24","j","f","m"]`

but when I split: `string.split("")`, the `2` and the `4` in `24` are separated. How can I account for double digits?

Edit: Here is the question I was trying to solve from a coding practice:

*Using the JavaScript language, have the function EvenPairs(str) take the str parameter being passed and determine if a pair of adjacent even numbers exists anywhere in the string. If a pair exists, return the string true, otherwise return false. For example: if str is "f178svg3k19k46" then there are two even numbers at the end of the string, "46" so your program should return the string true. Another example: if str is "7r5gg812" then the pair is "812" (8 and 12) so your program should return the string true.*

Answer: 
You could take a staged approach by

* getting only numbers of the string in an array
* filer by length of the string,
* check if two of the digits are even

```js
function even(n) {
    return !(n % 2);
}

function checkEvenPair(string) {
    return string
        .match(/\d+/g)
        .filter(s => s.length > 1)
        .some(s => 
            [...s].some((c => v => even(v) && !--c)(2))
        );
}

console.log(checkEvenPair('2f35fq1p97y931'));   // false
console.log(checkEvenPair('3y4jd424jfm'));      // true  4  2
console.log(checkEvenPair('f178svg3k19k46'));   // true  4  6
console.log(checkEvenPair('7r5gg812'));         // true  8 12
console.log(checkEvenPair('2f35fq1p97y92321')); // true  (9)2 32
```

A regular expression solution by taking only even numbers for matching.

```js
function checkEvenPair(string) {
    return /[02468]\d*[02468]/.test(string);
}

console.log(checkEvenPair('2f35fq1p97y931'));   // false
console.log(checkEvenPair('3y4jd424jfm'));      // true
console.log(checkEvenPair('f178svg3k19k46'));   // true
console.log(checkEvenPair('7r5gg812'));         // true
console.log(checkEvenPair('2f35fq1p97y92321')); // true
```
You can use `RegExp` for that, you don't need to check if two numbers are even, you just need to check two constitutive chars (which is numbers) are even.
so for `1234` you don't have to check `12` and `34` in that case the question could have been more complicated (what will be solved here). you just need to check [`1 & 2`], [`2 & 3`], [`3 & 4`] where none of them are even pairs.

And we can avoid parsing string and read as number, arithmetic calculation for even,.. and such things. 

So, for the the simple one (consicutive even chars)

Regex for even digit is : `/[02468]/`

`<your string>.match(/[02468]{2}/)` would give you the result.

Example:

```js
function EvenPairs(str) {
  let evensDigit = '[02468]',
      consecutiveEvenRegex = new RegExp(evensDigit + "{2}");
  return !!str.match(consecutiveEvenRegex);
}

let str1 = "f178svg3k19k46"; //should be true as 4 then 6
let str2 = "7r5gg812"; // should be false, as 8 -> 1 -> 2 (and not 8 then 12)

console.log(`Test EvenPairs for ${str1}: `, EvenPairs(str1));
console.log(`Test EvenPairs for ${str2}: `, EvenPairs(str2));
```

Now back to the actual (probable) problem to check for 2 constitutive even numbers (not only chars) we just need to check the existence of:

`<any even char><empty or 0-9 char><any even char>` i.e. `/[02468][0-9]{0,}[02468]/`

let's create a working example for it

```js
function EvenPairs(str) {
  let evenDigit = '[02468]',
      digitsOrEmpty = '[0-9]{0,}',
      consecutiveEvenRegex = new RegExp(evenDigit + digitsOrEmpty + evenDigit);
  return !!str.match(consecutiveEvenRegex);
}

let str1 = "f178svg3k19k46"; //should be true as 4 then 6
let str2 = "7r5gg812"; // should be true as well, as 8 -> 12

console.log(`Test EvenPairs for ${str1}: `, EvenPairs(str1));
console.log(`Test EvenPairs for ${str2}: `, EvenPairs(str2));
```