let username = "JackOfAllTrades11";
let userCheck = /^[a-z]{2,}\d*$/i; // Change this line
let result = userCheck.test(username);
let result1 = username.match(userCheck);
console.log(result1);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.80 Safari/537.36.
Because the global flag makes the test method behave differently
You were never taught to use the g flag with the test method because it would be rare to use it that way
If you are interested to know more check the documentation on the test() method