Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
let username = "Oceans11";
let userCheck;
console.log(username.length)
// let userCheck = /^[a-z]+[a-z]\d*$/ig;
// let result = userCheck.test(username);
// console.log(result);
// console.log(username.match(userCheck));
if(username.length <= 2){
userCheck = /^[a-z]+[a-z]$/ig;
}
else{
userCheck = /^[a-z]+[a-z]*\d*$/ig;
}
let result = userCheck.test(username);
console.log(result);
console.log(username.match(userCheck));
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36
Challenge: Restrict Possible Usernames
Link to the challenge: