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: 
Use regex for number extract then split for char as following:

```
var regex = /\d+/g;
var string = "3y4jd424jfm";
var numbers = string.match(regex); 

var chars = string.replace(/\d+/g, "").split("");

var parts = numbers.concat(chars);

console.log(parts);

```
Starting from this example `7r5gg812`, the answer is true because there's a couple of even numbers `8` and `12` next to each other.

A possible solution is to iterate over the string with a counter that is incremented when you see an even digit, reset to 0 when it's not a digit. Odd digits are simply ignored:

```
function EvenPairs(str) { 
  let counter = 0;
  for (let i = 0; i < str.length; i++) {
    if (isNaN(str[i] % 2)) {
      counter = 0;
    } else if (str[i] % 2 === 0) {
      counter++;
    }

    if (counter === 2) {
        return true;
    } 
  }
  return false; 
}

```

Other solution, using regexps:

```
function EvenPairs(str) { 
    return /\d\d/.test(str.replace(/[13579]/g, ''));
}

```