Hello. I have a small question. I have this solution, and I modify result parameter with dog variabl e:
let username = "JackOfAllTrades";
let userCheck = /^[a-z][a-z]+\d*$/i; // change this line
let result = userCheck.test(dog);
let dog = "c57bT3"
My question is about why this console.log is true? Shouldn’t it return false? This does not check the first character as a letter (true), the second character as a (1 = true, 0 = false, or several letters in a row = true) and then the last as a number = true or several numbers in a row = true or nothing = true?
Oh, thanks. Now I see that. I feel so stupid. I didn’t see that. I just tried putting the variable (dog) before of result and yes, it works, yes, it returns false. I am very happy to see the sense. Thanks friends.